diff --git a/bazel/carbon_rules/defs.bzl b/bazel/carbon_rules/defs.bzl index f83a3a73b189..4a3361dd86a8 100644 --- a/bazel/carbon_rules/defs.bzl +++ b/bazel/carbon_rules/defs.bzl @@ -14,40 +14,42 @@ def _carbon_binary_impl(ctx): toolchain_driver = ctx.executable.internal_target_toolchain_driver toolchain_data = ctx.files.internal_target_toolchain_data + # Build object files for the prelude and for the binary itself. + # TODO: Eventually the prelude should be build as a separate `carbon_library`. + srcs_and_flags = [ + (ctx.files.prelude_srcs, ["--no-prelude-import"]), + (ctx.files.srcs, []), + ] objs = [] - for src in ctx.files.srcs: - # Build each source file. For now, we pass all sources to each compile - # because we don't have visibility into dependencies and have no way to - # specify multiple output files. Object code for each input is written - # into the output file in turn, so the final carbon source file - # specified ends up determining the contents of the object file. - # - # TODO: This is a hack; replace with something better once the toolchain - # supports doing so. - # - # TODO: Switch to the `prefix_root` based rule similar to linking when - # the prelude moves there. - out = ctx.actions.declare_file("_objs/{0}/{1}o".format( - ctx.label.name, - src.short_path.removeprefix(ctx.label.package).removesuffix(src.extension), - )) - objs.append(out) - srcs_reordered = [s for s in ctx.files.srcs if s != src] + [src] - ctx.actions.run( - outputs = [out], - inputs = srcs_reordered, - executable = toolchain_driver, - tools = depset(toolchain_data), - arguments = ["compile", "--output=" + out.path] + [s.path for s in srcs_reordered], - mnemonic = "CarbonCompile", - progress_message = "Compiling " + src.short_path, - ) + for (srcs, extra_flags) in srcs_and_flags: + for src in srcs: + # Build each source file. For now, we pass all sources to each compile + # because we don't have visibility into dependencies and have no way to + # specify multiple output files. Object code for each input is written + # into the output file in turn, so the final carbon source file + # specified ends up determining the contents of the object file. + # + # TODO: This is a hack; replace with something better once the toolchain + # supports doing so. + # + # TODO: Switch to the `prefix_root` based rule similar to linking when + # the prelude moves there. + out = ctx.actions.declare_file("_objs/{0}/{1}o".format( + ctx.label.name, + src.short_path.removeprefix(ctx.label.package).removesuffix(src.extension), + )) + objs.append(out) + srcs_reordered = [s for s in srcs if s != src] + [src] + ctx.actions.run( + outputs = [out], + inputs = srcs_reordered, + executable = toolchain_driver, + tools = depset(toolchain_data), + arguments = ["compile", "--output=" + out.path] + [s.path for s in srcs_reordered] + extra_flags, + mnemonic = "CarbonCompile", + progress_message = "Compiling " + src.short_path, + ) - # For now, we assume that the prelude doesn't produce any necessary object - # code, and don't include the .o files for //core/prelude... in the final - # linked binary. - # - # TODO: This will need to be revisited eventually. bin = ctx.actions.declare_file(ctx.label.name) ctx.actions.run( outputs = [bin], @@ -90,6 +92,7 @@ _carbon_binary_internal = rule( executable = True, cfg = "target", ), + "prelude_srcs": attr.label_list(allow_files = [".carbon"]), "srcs": attr.label_list(allow_files = [".carbon"]), }, executable = True, @@ -105,6 +108,7 @@ def carbon_binary(name, srcs): _carbon_binary_internal( name = name, srcs = srcs, + prelude_srcs = ["//core:prelude_files"], # We synthesize two sets of attributes from mirrored `select`s here # because we want to select on an internal property of these attributes diff --git a/core/BUILD b/core/BUILD index d46493959417..4a1028d21de8 100644 --- a/core/BUILD +++ b/core/BUILD @@ -8,6 +8,7 @@ load("//bazel/manifest:defs.bzl", "manifest") filegroup( name = "prelude_files", srcs = ["prelude.carbon"] + glob(["prelude/**/*.carbon"]), + visibility = ["//visibility:public"], ) # A list of prelude inputs. diff --git a/core/prelude/operators/as.carbon b/core/prelude/operators/as.carbon index 03d365463d7d..abf43896b31f 100644 --- a/core/prelude/operators/as.carbon +++ b/core/prelude/operators/as.carbon @@ -4,10 +4,6 @@ package Core library "prelude/operators/as"; -// For Core.Int, used below. -// TODO: Remove this when the below `impl`s are removed. -import library "prelude/types"; - interface As(Dest:! type) { fn Convert[self: Self]() -> Dest; } @@ -16,38 +12,3 @@ interface ImplicitAs(Dest:! type) { // TODO: extend As(Dest); fn Convert[self: Self]() -> Dest; } - -// TODO: These impls should live with Core.Int, but currently that's a builtin -// not a class type, so there is no other library these can go in. -impl forall [N:! IntLiteral()] IntLiteral() as ImplicitAs(Int(N)) { - fn Convert[self: Self]() -> Int(N) = "int.convert_checked"; -} - -impl forall [N:! IntLiteral()] IntLiteral() as ImplicitAs(UInt(N)) { - fn Convert[self: Self]() -> UInt(N) = "int.convert_checked"; -} - -impl forall [N:! IntLiteral()] Int(N) as ImplicitAs(IntLiteral()) { - fn Convert[self: Self]() -> IntLiteral() = "int.convert_checked"; -} - -impl forall [N:! IntLiteral()] UInt(N) as ImplicitAs(IntLiteral()) { - fn Convert[self: Self]() -> IntLiteral() = "int.convert_checked"; -} - -// TODO: Remove these once ImplicitAs extends As. -impl forall [N:! IntLiteral()] IntLiteral() as As(Int(N)) { - fn Convert[self: Self]() -> Int(N) = "int.convert_checked"; -} - -impl forall [N:! IntLiteral()] IntLiteral() as As(UInt(N)) { - fn Convert[self: Self]() -> UInt(N) = "int.convert_checked"; -} - -impl forall [N:! IntLiteral()] Int(N) as As(IntLiteral()) { - fn Convert[self: Self]() -> IntLiteral() = "int.convert_checked"; -} - -impl forall [N:! IntLiteral()] UInt(N) as As(IntLiteral()) { - fn Convert[self: Self]() -> IntLiteral() = "int.convert_checked"; -} diff --git a/core/prelude/types.carbon b/core/prelude/types.carbon index bb4b9ebb9db2..9ca9edba894b 100644 --- a/core/prelude/types.carbon +++ b/core/prelude/types.carbon @@ -5,13 +5,8 @@ package Core library "prelude/types"; export import library "prelude/types/bool"; +export import library "prelude/types/int_literal"; +export import library "prelude/types/int"; +export import library "prelude/types/uint"; -// TODO: Start importing `prelude/types/i32` here once we stop eagerly importing -// all `impl`s from all imported files. Currently, this introduces too much -// noise in the toolchain tests. -// import library "prelude/types/i32"; - -fn IntLiteral() -> type = "int_literal.make_type"; -fn Int(size: IntLiteral()) -> type = "int.make_type_signed"; -fn UInt(size: IntLiteral()) -> type = "int.make_type_unsigned"; fn Float(size: IntLiteral()) -> type = "float.make_type"; diff --git a/core/prelude/types/i32.carbon b/core/prelude/types/int.carbon similarity index 79% rename from core/prelude/types/i32.carbon rename to core/prelude/types/int.carbon index 540ebc5733ca..600a7cecf07c 100644 --- a/core/prelude/types/i32.carbon +++ b/core/prelude/types/int.carbon @@ -2,12 +2,36 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -package Core library "prelude/types/i32"; +package Core library "prelude/types/int"; -// For Int(): -import library "prelude/types"; +import library "prelude/types/int_literal"; import library "prelude/operators"; +private fn MakeInt(size: IntLiteral()) -> type = "int.make_type_signed"; + +class Int(N:! IntLiteral()) { + adapt MakeInt(N); +} + +impl forall [N:! IntLiteral()] IntLiteral() as ImplicitAs(Int(N)) { + fn Convert[self: Self]() -> Int(N) = "int.convert_checked"; +} + +impl forall [N:! IntLiteral()] Int(N) as ImplicitAs(IntLiteral()) { + fn Convert[self: Self]() -> IntLiteral() = "int.convert_checked"; +} + +// TODO: Remove these once ImplicitAs extends As. +impl forall [N:! IntLiteral()] IntLiteral() as As(Int(N)) { + fn Convert[self: Self]() -> Int(N) = "int.convert_checked"; +} + +impl forall [N:! IntLiteral()] Int(N) as As(IntLiteral()) { + fn Convert[self: Self]() -> IntLiteral() = "int.convert_checked"; +} + +// TODO: Make these operations generic. + impl i32 as Add { fn Op[self: Self](other: Self) -> Self = "int.sadd"; } diff --git a/core/prelude/types/int_literal.carbon b/core/prelude/types/int_literal.carbon new file mode 100644 index 000000000000..5391b3faba51 --- /dev/null +++ b/core/prelude/types/int_literal.carbon @@ -0,0 +1,7 @@ +// Part of the Carbon Language project, under the Apache License v2.0 with LLVM +// Exceptions. See /LICENSE for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +package Core library "prelude/types/int_literal"; + +fn IntLiteral() -> type = "int_literal.make_type"; diff --git a/core/prelude/types/uint.carbon b/core/prelude/types/uint.carbon new file mode 100644 index 000000000000..e5d236992aa9 --- /dev/null +++ b/core/prelude/types/uint.carbon @@ -0,0 +1,33 @@ +// Part of the Carbon Language project, under the Apache License v2.0 with LLVM +// Exceptions. See /LICENSE for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +package Core library "prelude/types/uint"; + +import library "prelude/types/int_literal"; +import library "prelude/operators"; + +private fn MakeUInt(size: IntLiteral()) -> type = "int.make_type_unsigned"; + +class UInt(N:! IntLiteral()) { + adapt MakeUInt(N); +} + +impl forall [N:! IntLiteral()] IntLiteral() as ImplicitAs(UInt(N)) { + fn Convert[self: Self]() -> UInt(N) = "int.convert_checked"; +} + +impl forall [N:! IntLiteral()] UInt(N) as ImplicitAs(IntLiteral()) { + fn Convert[self: Self]() -> IntLiteral() = "int.convert_checked"; +} + +// TODO: Remove these once ImplicitAs extends As. +impl forall [N:! IntLiteral()] IntLiteral() as As(UInt(N)) { + fn Convert[self: Self]() -> UInt(N) = "int.convert_checked"; +} + +impl forall [N:! IntLiteral()] UInt(N) as As(IntLiteral()) { + fn Convert[self: Self]() -> IntLiteral() = "int.convert_checked"; +} + +// TODO: Operations. diff --git a/examples/sieve.carbon b/examples/sieve.carbon index efe6e7c9a64e..c882d7581003 100644 --- a/examples/sieve.carbon +++ b/examples/sieve.carbon @@ -4,85 +4,6 @@ // Compute and return the number of primes less than 1000. -// TODO: Copied from core/prelude/types/i32.carbon. -// Because we don't deduplicate interfaces, the implementations in that file are -// treated as implementing a different interface from the one we import above. -// Remove the following, once we deduplicate interfaces. - -impl i32 as Core.Add { - fn Op[self: Self](other: Self) -> Self = "int.sadd"; -} -impl i32 as Core.AddAssign { - fn Op[addr self: Self*](other: Self) { - *self = *self + other; - } -} -impl i32 as Core.Inc { - fn Op[addr self: Self*]() { - *self += 1; - } -} - -impl i32 as Core.Div { - fn Op[self: Self](other: Self) -> Self = "int.sdiv"; -} -impl i32 as Core.DivAssign { - fn Op[addr self: Self*](other: Self) { - *self = *self / other; - } -} - -impl i32 as Core.Eq { - fn Equal[self: Self](other: Self) -> bool = "int.eq"; - fn NotEqual[self: Self](other: Self) -> bool = "int.neq"; -} - -impl i32 as Core.Mod { - fn Op[self: Self](other: Self) -> Self = "int.smod"; -} -impl i32 as Core.ModAssign { - fn Op[addr self: Self*](other: Self) { - *self = *self % other; - } -} - -impl i32 as Core.Mul { - fn Op[self: Self](other: Self) -> Self = "int.smul"; -} -impl i32 as Core.MulAssign { - fn Op[addr self: Self*](other: Self) { - *self = *self * other; - } -} - -impl i32 as Core.Negate { - fn Op[self: Self]() -> Self = "int.snegate"; -} - -impl i32 as Core.Ordered { - // TODO: fn Compare - fn Less[self: Self](other: Self) -> bool = "int.less"; - fn LessOrEquivalent[self: Self](other: Self) -> bool = "int.less_eq"; - fn Greater[self: Self](other: Self) -> bool = "int.greater"; - fn GreaterOrEquivalent[self: Self](other: Self) -> bool = "int.greater_eq"; -} - -impl i32 as Core.Sub { - fn Op[self: Self](other: Self) -> Self = "int.ssub"; -} -impl i32 as Core.SubAssign { - fn Op[addr self: Self*](other: Self) { - *self = *self - other; - } -} -impl i32 as Core.Dec { - fn Op[addr self: Self*]() { - *self -= 1; - } -} - -// --- - class Sieve { fn Make() -> Sieve { returned var s: Sieve; diff --git a/toolchain/check/context.cpp b/toolchain/check/context.cpp index 3b1c43c268f2..40199304e6ce 100644 --- a/toolchain/check/context.cpp +++ b/toolchain/check/context.cpp @@ -1261,8 +1261,9 @@ class TypeCompleter { }; } // namespace -auto Context::TryToCompleteType(SemIR::TypeId type_id, SemIRLoc loc) -> bool { - return TypeCompleter(*this, loc, nullptr).Complete(type_id); +auto Context::TryToCompleteType(SemIR::TypeId type_id, SemIRLoc loc, + BuildDiagnosticFn diagnoser) -> bool { + return TypeCompleter(*this, loc, diagnoser).Complete(type_id); } auto Context::CompleteTypeOrCheckFail(SemIR::TypeId type_id) -> void { diff --git a/toolchain/check/context.h b/toolchain/check/context.h index 500624f936a5..f884db6dfe33 100644 --- a/toolchain/check/context.h +++ b/toolchain/check/context.h @@ -344,8 +344,11 @@ class Context { // symbolic. // // Avoid calling this where possible, as it can lead to coherence issues. - // TODO: Remove the remaining call to this and delete this function. - auto TryToCompleteType(SemIR::TypeId type_id, SemIRLoc loc) -> bool; + // However, it's important that we use it during monomorphization, where we + // don't want to trigger a request for more monomorphization. + // TODO: Remove the other call to this function. + auto TryToCompleteType(SemIR::TypeId type_id, SemIRLoc loc, + BuildDiagnosticFn diagnoser = nullptr) -> bool; // Completes the type `type_id`. CHECK-fails if it can't be completed. auto CompleteTypeOrCheckFail(SemIR::TypeId type_id) -> void; diff --git a/toolchain/check/eval.cpp b/toolchain/check/eval.cpp index b70ac1d0dcd9..489e34057c4f 100644 --- a/toolchain/check/eval.cpp +++ b/toolchain/check/eval.cpp @@ -1803,19 +1803,16 @@ static auto TryEvalInstInContext(EvalContext& eval_context, // If the type is a template constant, require it to be complete now. if (phase == Phase::Template) { - // No location is needed here because we know the type is not a symbolic - // constant. - complete_type_id = eval_context.context().AsCompleteType( - complete_type_id, SemIR::LocId::Invalid, [&] { - CARBON_DIAGNOSTIC(IncompleteTypeInMonomorphization, Error, - "{0} evaluates to incomplete type {1}", - SemIR::TypeId, SemIR::TypeId); - return eval_context.emitter().Build( - eval_context.GetDiagnosticLoc(inst_id), - IncompleteTypeInMonomorphization, - require_complete.complete_type_id, complete_type_id); - }); - if (complete_type_id == SemIR::ErrorInst::SingletonTypeId) { + if (!eval_context.context().TryToCompleteType( + complete_type_id, eval_context.GetDiagnosticLoc(inst_id), [&] { + CARBON_DIAGNOSTIC(IncompleteTypeInMonomorphization, Error, + "{0} evaluates to incomplete type {1}", + SemIR::TypeId, SemIR::TypeId); + return eval_context.emitter().Build( + eval_context.GetDiagnosticLoc(inst_id), + IncompleteTypeInMonomorphization, + require_complete.complete_type_id, complete_type_id); + })) { return SemIR::ErrorInst::SingletonConstantId; } return MakeConstantResult( diff --git a/toolchain/check/import_ref.cpp b/toolchain/check/import_ref.cpp index 6b317a0a7b6d..fbc0cf0dcdf1 100644 --- a/toolchain/check/import_ref.cpp +++ b/toolchain/check/import_ref.cpp @@ -2292,8 +2292,12 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver, SemIR::InstId import_inst_id) -> ResolveResult { const auto& name_scope = resolver.import_name_scopes().Get(inst.name_scope_id); + // A package from a different file becomes a child of the package here, as it + // would be if it were imported. auto parent_scope_id = - GetLocalNameScopeId(resolver, name_scope.parent_scope_id()); + inst.name_scope_id == SemIR::NameScopeId::Package + ? SemIR::NameScopeId::Package + : GetLocalNameScopeId(resolver, name_scope.parent_scope_id()); if (resolver.HasNewWork()) { return ResolveResult::Retry(); @@ -2312,6 +2316,11 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver, auto name_id = GetLocalNameId(resolver, name_scope.name_id()); namespace_decl.name_scope_id = resolver.local_name_scopes().Add(inst_id, name_id, parent_scope_id); + // Namespaces from this package are eagerly imported, so anything we load here + // must be a closed import. + resolver.local_name_scopes() + .Get(namespace_decl.name_scope_id) + .set_is_closed_import(true); resolver.local_context().ReplaceInstBeforeConstantUse(inst_id, namespace_decl); return {.const_id = resolver.local_constant_values().Get(inst_id)}; diff --git a/toolchain/check/testdata/alias/fail_builtins.carbon b/toolchain/check/testdata/alias/fail_builtins.carbon index 62aabfe2fe07..b643a8cce065 100644 --- a/toolchain/check/testdata/alias/fail_builtins.carbon +++ b/toolchain/check/testdata/alias/fail_builtins.carbon @@ -23,9 +23,7 @@ alias b = bool; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: } @@ -33,7 +31,7 @@ alias b = bool; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .Bool = %import_ref.2 +// CHECK:STDOUT: .Bool = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -47,7 +45,7 @@ alias b = bool; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a: = bind_alias a, [template = ] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %b: = bind_alias b, [template = ] diff --git a/toolchain/check/testdata/array/array_in_place.carbon b/toolchain/check/testdata/array/array_in_place.carbon index 5db589b566ee..55fe9f4468aa 100644 --- a/toolchain/check/testdata/array/array_in_place.carbon +++ b/toolchain/check/testdata/array/array_in_place.carbon @@ -18,9 +18,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32, %i32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -36,7 +34,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -54,19 +52,13 @@ fn G() { // CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_12: init type = call constants.%Int(%int_32.loc11_12) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_17: init type = call constants.%Int(%int_32.loc11_17) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_22: init type = call constants.%Int(%int_32.loc11_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_12, %int.make_type_signed.loc11_17, %int.make_type_signed.loc11_22) -// CHECK:STDOUT: %.loc11_25.2: type = value_of_initializer %int.make_type_signed.loc11_12 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.3: type = converted %int.make_type_signed.loc11_12, %.loc11_25.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.4: type = value_of_initializer %int.make_type_signed.loc11_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.5: type = converted %int.make_type_signed.loc11_17, %.loc11_25.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.6: type = value_of_initializer %int.make_type_signed.loc11_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.7: type = converted %int.make_type_signed.loc11_22, %.loc11_25.6 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.8: type = converted %.loc11_25.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc11_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_25.1: %tuple.type.1 = tuple_literal (%i32.loc11_12, %i32.loc11_17, %i32.loc11_22) +// CHECK:STDOUT: %.loc11_25.2: type = converted %.loc11_25.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %return.param: ref %tuple.type.2 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %tuple.type.2 = return_slot %return.param // CHECK:STDOUT: } @@ -78,20 +70,14 @@ fn G() { // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_32.loc14_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_12: init type = call constants.%Int(%int_32.loc14_12) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc14_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_17: init type = call constants.%Int(%int_32.loc14_17) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc14_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_22: init type = call constants.%Int(%int_32.loc14_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_25.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc14_12, %int.make_type_signed.loc14_17, %int.make_type_signed.loc14_22) +// CHECK:STDOUT: %i32.loc14_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_25.1: %tuple.type.1 = tuple_literal (%i32.loc14_12, %i32.loc14_17, %i32.loc14_22) // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] -// CHECK:STDOUT: %.loc14_25.2: type = value_of_initializer %int.make_type_signed.loc14_12 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_25.3: type = converted %int.make_type_signed.loc14_12, %.loc14_25.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_25.4: type = value_of_initializer %int.make_type_signed.loc14_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_25.5: type = converted %int.make_type_signed.loc14_17, %.loc14_25.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_25.6: type = value_of_initializer %int.make_type_signed.loc14_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_25.7: type = converted %int.make_type_signed.loc14_22, %.loc14_25.6 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_25.8: type = converted %.loc14_25.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %.loc14_25.2: type = converted %.loc14_25.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %array_type: type = array_type %int_2, %tuple.type.2 [template = constants.%array_type] // CHECK:STDOUT: %v.var: ref %array_type = var v // CHECK:STDOUT: %v: ref %array_type = bind_name v, %v.var diff --git a/toolchain/check/testdata/array/array_vs_tuple.carbon b/toolchain/check/testdata/array/array_vs_tuple.carbon index a86251521fde..1b616884bac3 100644 --- a/toolchain/check/testdata/array/array_vs_tuple.carbon +++ b/toolchain/check/testdata/array/array_vs_tuple.carbon @@ -20,9 +20,7 @@ fn G() { // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %array_type: type = array_type %int_3.1, %i32 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] @@ -30,16 +28,16 @@ fn G() { // CHECK:STDOUT: %tuple.type.1: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %int_0: 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.2, %int_2.2, %int_3.2) [template] @@ -51,7 +49,7 @@ fn G() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -69,10 +67,8 @@ fn G() { // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: // 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: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_3.loc13_16: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc13_11.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_11.2: type = converted %int.make_type_signed.loc13, %.loc13_11.1 [template = constants.%i32] // CHECK:STDOUT: %array_type: type = array_type %int_3.loc13_16, %i32 [template = constants.%array_type] // CHECK:STDOUT: %a.var: ref %array_type = var a // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var @@ -80,7 +76,7 @@ fn G() { // CHECK:STDOUT: %int_2.loc13_25: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %int_3.loc13_28: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc13_29.1: %tuple.type.1 = tuple_literal (%int_1.loc13_22, %int_2.loc13_25, %int_3.loc13_28) -// CHECK:STDOUT: %impl.elem0.loc13_29.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13_29.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13_29.1: = bound_method %int_1.loc13_22, %impl.elem0.loc13_29.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc13_29.1: = specific_function %Convert.bound.loc13_29.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc13_29.1: init %i32 = call %Convert.specific_fn.loc13_29.1(%int_1.loc13_22) [template = constants.%int_1.2] @@ -88,7 +84,7 @@ fn G() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %.loc13_29.3: ref %i32 = array_index %a.var, %int_0 // CHECK:STDOUT: %.loc13_29.4: init %i32 = initialize_from %.loc13_29.2 to %.loc13_29.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc13_29.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13_29.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13_29.2: = bound_method %int_2.loc13_25, %impl.elem0.loc13_29.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc13_29.2: = specific_function %Convert.bound.loc13_29.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc13_29.2: init %i32 = call %Convert.specific_fn.loc13_29.2(%int_2.loc13_25) [template = constants.%int_2.2] @@ -96,7 +92,7 @@ fn G() { // CHECK:STDOUT: %int_1.loc13_29: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc13_29.6: ref %i32 = array_index %a.var, %int_1.loc13_29 // CHECK:STDOUT: %.loc13_29.7: init %i32 = initialize_from %.loc13_29.5 to %.loc13_29.6 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc13_29.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13_29.3: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13_29.3: = bound_method %int_3.loc13_28, %impl.elem0.loc13_29.3 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc13_29.3: = specific_function %Convert.bound.loc13_29.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc13_29.3: init %i32 = call %Convert.specific_fn.loc13_29.3(%int_3.loc13_28) [template = constants.%int_3.2] @@ -108,40 +104,34 @@ fn G() { // CHECK:STDOUT: %.loc13_30: init %array_type = converted %.loc13_29.1, %.loc13_29.11 [template = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc13_30 // CHECK:STDOUT: %int_32.loc14_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_11: init type = call constants.%Int(%int_32.loc14_11) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc14_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_16: init type = call constants.%Int(%int_32.loc14_16) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc14_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_21: init type = call constants.%Int(%int_32.loc14_21) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_24.1: %tuple.type.2 = tuple_literal (%int.make_type_signed.loc14_11, %int.make_type_signed.loc14_16, %int.make_type_signed.loc14_21) -// CHECK:STDOUT: %.loc14_24.2: type = value_of_initializer %int.make_type_signed.loc14_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_24.3: type = converted %int.make_type_signed.loc14_11, %.loc14_24.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_24.4: type = value_of_initializer %int.make_type_signed.loc14_16 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_24.5: type = converted %int.make_type_signed.loc14_16, %.loc14_24.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_24.6: type = value_of_initializer %int.make_type_signed.loc14_21 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_24.7: type = converted %int.make_type_signed.loc14_21, %.loc14_24.6 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_24.8: type = converted %.loc14_24.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] +// CHECK:STDOUT: %i32.loc14_21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_24.1: %tuple.type.2 = tuple_literal (%i32.loc14_11, %i32.loc14_16, %i32.loc14_21) +// CHECK:STDOUT: %.loc14_24.2: type = converted %.loc14_24.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] // CHECK:STDOUT: %b.var: ref %tuple.type.3 = var b // CHECK:STDOUT: %b: ref %tuple.type.3 = bind_name b, %b.var // CHECK:STDOUT: %int_1.loc14: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc14: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %int_3.loc14: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc14_36.1: %tuple.type.1 = tuple_literal (%int_1.loc14, %int_2.loc14, %int_3.loc14) -// CHECK:STDOUT: %impl.elem0.loc14_36.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14_36.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_36.1: = bound_method %int_1.loc14, %impl.elem0.loc14_36.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc14_36.1: = specific_function %Convert.bound.loc14_36.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc14_36.1: init %i32 = call %Convert.specific_fn.loc14_36.1(%int_1.loc14) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc14_36.2: init %i32 = converted %int_1.loc14, %int.convert_checked.loc14_36.1 [template = constants.%int_1.2] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %b.var, element0 // CHECK:STDOUT: %.loc14_36.3: init %i32 = initialize_from %.loc14_36.2 to %tuple.elem0 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc14_36.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14_36.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_36.2: = bound_method %int_2.loc14, %impl.elem0.loc14_36.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc14_36.2: = specific_function %Convert.bound.loc14_36.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc14_36.2: init %i32 = call %Convert.specific_fn.loc14_36.2(%int_2.loc14) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc14_36.4: init %i32 = converted %int_2.loc14, %int.convert_checked.loc14_36.2 [template = constants.%int_2.2] // CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access %b.var, element1 // CHECK:STDOUT: %.loc14_36.5: init %i32 = initialize_from %.loc14_36.4 to %tuple.elem1 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc14_36.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14_36.3: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_36.3: = bound_method %int_3.loc14, %impl.elem0.loc14_36.3 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc14_36.3: = specific_function %Convert.bound.loc14_36.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc14_36.3: init %i32 = call %Convert.specific_fn.loc14_36.3(%int_3.loc14) [template = constants.%int_3.2] diff --git a/toolchain/check/testdata/array/assign_return_value.carbon b/toolchain/check/testdata/array/assign_return_value.carbon index 8d75c49cdef7..93be65ea45e9 100644 --- a/toolchain/check/testdata/array/assign_return_value.carbon +++ b/toolchain/check/testdata/array/assign_return_value.carbon @@ -18,9 +18,7 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -28,10 +26,10 @@ fn Run() { // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_0.2) [template] @@ -44,7 +42,7 @@ fn Run() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -62,11 +60,9 @@ fn Run() { // CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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_16.1: %tuple.type.1 = tuple_literal (%int.make_type_signed) -// CHECK:STDOUT: %.loc11_16.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_16.3: type = converted %int.make_type_signed, %.loc11_16.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_16.4: type = converted %.loc11_16.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_16.1: %tuple.type.1 = tuple_literal (%i32) +// CHECK:STDOUT: %.loc11_16.2: type = converted %.loc11_16.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %return.param: ref %tuple.type.2 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %tuple.type.2 = return_slot %return.param // CHECK:STDOUT: } @@ -77,7 +73,7 @@ fn Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc11_30.1: %tuple.type.3 = tuple_literal (%int_0) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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] @@ -91,10 +87,8 @@ fn Run() { // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] -// CHECK:STDOUT: %.loc14_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_11.2: type = converted %int.make_type_signed, %.loc14_11.1 [template = constants.%i32] // CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template = constants.%array_type] // CHECK:STDOUT: %t.var: ref %array_type = var t // CHECK:STDOUT: %t: ref %array_type = bind_name t, %t.var diff --git a/toolchain/check/testdata/array/assign_var.carbon b/toolchain/check/testdata/array/assign_var.carbon index d92779d5dd3a..5e6e03639d01 100644 --- a/toolchain/check/testdata/array/assign_var.carbon +++ b/toolchain/check/testdata/array/assign_var.carbon @@ -15,9 +15,7 @@ var b: [i32; 3] = a; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32, %i32) [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] @@ -25,16 +23,16 @@ var b: [i32; 3] = a; // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, Core.IntLiteral, 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_1.2, %int_2.2, %int_3.2) [template] @@ -45,7 +43,7 @@ var b: [i32; 3] = a; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -59,26 +57,18 @@ var b: [i32; 3] = a; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%int_32.loc11_9) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%int_32.loc11_14) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_19: init type = call constants.%Int(%int_32.loc11_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_22.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_9, %int.make_type_signed.loc11_14, %int.make_type_signed.loc11_19) -// CHECK:STDOUT: %.loc11_22.2: type = value_of_initializer %int.make_type_signed.loc11_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_22.3: type = converted %int.make_type_signed.loc11_9, %.loc11_22.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_22.4: type = value_of_initializer %int.make_type_signed.loc11_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_22.5: type = converted %int.make_type_signed.loc11_14, %.loc11_22.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_22.6: type = value_of_initializer %int.make_type_signed.loc11_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_22.7: type = converted %int.make_type_signed.loc11_19, %.loc11_22.6 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_22.8: type = converted %.loc11_22.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_22.1: %tuple.type.1 = tuple_literal (%i32.loc11_9, %i32.loc11_14, %i32.loc11_19) +// CHECK:STDOUT: %.loc11_22.2: type = converted %.loc11_22.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var // 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: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc12_9.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_9.2: type = converted %int.make_type_signed.loc12, %.loc12_9.1 [template = constants.%i32] // CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template = constants.%array_type] // CHECK:STDOUT: %b.var: ref %array_type = var b // CHECK:STDOUT: %b: ref %array_type = bind_name b, %b.var @@ -90,21 +80,21 @@ var b: [i32; 3] = a; // CHECK:STDOUT: %int_2.loc11: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc11_34.1: %tuple.type.3 = tuple_literal (%int_1.loc11, %int_2.loc11, %int_3) -// CHECK:STDOUT: %impl.elem0.loc11_34.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_34.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_34.1: = bound_method %int_1.loc11, %impl.elem0.loc11_34.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_34.1: = specific_function %Convert.bound.loc11_34.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_34.1: init %i32 = call %Convert.specific_fn.loc11_34.1(%int_1.loc11) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc11_34.2: init %i32 = converted %int_1.loc11, %int.convert_checked.loc11_34.1 [template = constants.%int_1.2] // CHECK:STDOUT: %tuple.elem0.loc11: ref %i32 = tuple_access file.%a.var, element0 // CHECK:STDOUT: %.loc11_34.3: init %i32 = initialize_from %.loc11_34.2 to %tuple.elem0.loc11 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc11_34.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_34.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_34.2: = bound_method %int_2.loc11, %impl.elem0.loc11_34.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_34.2: = specific_function %Convert.bound.loc11_34.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_34.2: init %i32 = call %Convert.specific_fn.loc11_34.2(%int_2.loc11) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc11_34.4: init %i32 = converted %int_2.loc11, %int.convert_checked.loc11_34.2 [template = constants.%int_2.2] // CHECK:STDOUT: %tuple.elem1.loc11: ref %i32 = tuple_access file.%a.var, element1 // CHECK:STDOUT: %.loc11_34.5: init %i32 = initialize_from %.loc11_34.4 to %tuple.elem1.loc11 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc11_34.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_34.3: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_34.3: = bound_method %int_3, %impl.elem0.loc11_34.3 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc11_34.3: = specific_function %Convert.bound.loc11_34.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc11_34.3: init %i32 = call %Convert.specific_fn.loc11_34.3(%int_3) [template = constants.%int_3.2] diff --git a/toolchain/check/testdata/array/base.carbon b/toolchain/check/testdata/array/base.carbon index c398b4bf4dc8..21002ef401a5 100644 --- a/toolchain/check/testdata/array/base.carbon +++ b/toolchain/check/testdata/array/base.carbon @@ -16,19 +16,17 @@ var c: [(); 5] = ((), (), (), (), (),); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %array_type.1: type = array_type %int_1.1, %i32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (Core.IntLiteral) [template] // CHECK:STDOUT: %int_0: 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %array.1: %array_type.1 = tuple_value (%int_1.2) [template] @@ -53,8 +51,8 @@ var c: [(); 5] = ((), (), (), (), (),); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 -// CHECK:STDOUT: .Float = %import_ref.38 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 +// CHECK:STDOUT: .Float = %import_ref.193 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -69,10 +67,8 @@ var c: [(); 5] = ((), (), (), (), (),); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed, %.loc11_9.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc11: type = array_type %int_1, %i32 [template = constants.%array_type.1] // CHECK:STDOUT: %a.var: ref %array_type.1 = var a // CHECK:STDOUT: %a: ref %array_type.1 = bind_name a, %a.var @@ -96,7 +92,7 @@ var c: [(); 5] = ((), (), (), (), (),); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc11_22.1: %tuple.type.1 = tuple_literal (%int_1.loc11) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.loc11, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_1.loc11) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/array/canonicalize_index.carbon b/toolchain/check/testdata/array/canonicalize_index.carbon index 77c5ea3a4426..ede43d291df3 100644 --- a/toolchain/check/testdata/array/canonicalize_index.carbon +++ b/toolchain/check/testdata/array/canonicalize_index.carbon @@ -19,56 +19,52 @@ let c: [i32; ConvertToU32(3)]* = &a; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Add.type: type = fn_type @Add [template] -// CHECK:STDOUT: %Add: %Add.type = struct_value () [template] -// CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] -// CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %u32: type = int_type unsigned, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Add.type.1: type = fn_type @Add.1 [template] +// CHECK:STDOUT: %Add: %Add.type.1 = struct_value () [template] +// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(%int_32) [template] // CHECK:STDOUT: %ConvertToU32.type: type = fn_type @ConvertToU32 [template] // CHECK:STDOUT: %ConvertToU32: %ConvertToU32.type = struct_value () [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: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %int_3.1: %i32 = int_value 3 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.15 [template] -// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.11 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.3(%int_32) [template] // CHECK:STDOUT: %int_3.2: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %array_type: type = array_type %int_3.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_3.2, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_3.2, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.2, %int_2.2, %int_3.1) [template] // CHECK:STDOUT: %int_3.3: %u32 = int_value 3 [template] -// CHECK:STDOUT: %Convert.type.16: type = fn_type @Convert.5, @impl.4(%int_32) [template] +// CHECK:STDOUT: %Convert.type.16: type = fn_type @Convert.8, @impl.32(%int_32) [template] // CHECK:STDOUT: %Convert.16: %Convert.type.16 = struct_value () [template] // CHECK:STDOUT: %interface.11: = interface_witness (%Convert.16) [template] // CHECK:STDOUT: %Convert.bound.5: = bound_method %int_3.3, %Convert.16 [template] -// CHECK:STDOUT: %Convert.specific_fn.5: = specific_function %Convert.bound.5, @Convert.5(%int_32) [template] +// CHECK:STDOUT: %Convert.specific_fn.5: = specific_function %Convert.bound.5, @Convert.8(%int_32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .UInt = %import_ref.2 -// CHECK:STDOUT: .ImplicitAs = %import_ref.3 +// CHECK:STDOUT: .UInt = %import_ref.5 +// CHECK:STDOUT: .ImplicitAs = %import_ref.9 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -84,7 +80,7 @@ let c: [i32; ConvertToU32(3)]* = &a; // CHECK:STDOUT: .c = @__global_init.%c // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Add.decl: %Add.type = fn_decl @Add [template = constants.%Add] { +// CHECK:STDOUT: %Add.decl: %Add.type.1 = fn_decl @Add.1 [template = constants.%Add] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -93,17 +89,11 @@ let c: [i32; ConvertToU32(3)]* = &a; // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // 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_11.1: type = value_of_initializer %int.make_type_signed.loc11_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed.loc11_11, %.loc11_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_19: init type = call constants.%Int(%int_32.loc11_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_signed.loc11_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_signed.loc11_19, %.loc11_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_27: init type = call constants.%Int(%int_32.loc11_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_27.1: type = value_of_initializer %int.make_type_signed.loc11_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_27.2: type = converted %int.make_type_signed.loc11_27, %.loc11_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -118,41 +108,35 @@ let c: [i32; ConvertToU32(3)]* = &a; // CHECK:STDOUT: %return.param_patt: %u32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc12_20: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32.loc12_20) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_20.2: type = converted %int.make_type_signed, %.loc12_20.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc12_28: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_32.loc12_28) [template = constants.%u32] -// CHECK:STDOUT: %.loc12_28.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u32] -// CHECK:STDOUT: %.loc12_28.2: type = converted %int.make_type_unsigned, %.loc12_28.1 [template = constants.%u32] +// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %u32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %u32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%int_32.loc14) [template = constants.%i32] -// CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, %Add.decl [template = constants.%Add] +// CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %Add.ref: %Add.type.1 = name_ref Add, %Add.decl [template = constants.%Add] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc14_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14_18: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_18: = bound_method %int_1, %impl.elem0.loc14_18 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc14_18: = specific_function %Convert.bound.loc14_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc14_18: init %i32 = call %Convert.specific_fn.loc14_18(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc14_18.1: %i32 = value_of_initializer %int.convert_checked.loc14_18 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc14_18.2: %i32 = converted %int_1, %.loc14_18.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc14_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14_21: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_21: = bound_method %int_2, %impl.elem0.loc14_21 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc14_21: = specific_function %Convert.bound.loc14_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc14_21: init %i32 = call %Convert.specific_fn.loc14_21(%int_2) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc14_21.1: %i32 = value_of_initializer %int.convert_checked.loc14_21 [template = constants.%int_2.2] // CHECK:STDOUT: %.loc14_21.2: %i32 = converted %int_2, %.loc14_21.1 [template = constants.%int_2.2] // CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%.loc14_18.2, %.loc14_21.2) [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc14_9.1: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_9.2: type = converted %int.make_type_signed.loc14, %.loc14_9.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc14_22: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %impl.elem0.loc14_22: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc14_22: = bound_method %int.sadd, %impl.elem0.loc14_22 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc14_22: = specific_function %Convert.bound.loc14_22, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %Convert.specific_fn.loc14_22: = specific_function %Convert.bound.loc14_22, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %.loc14_22.1: %i32 = value_of_initializer %int.sadd [template = constants.%int_3.1] // CHECK:STDOUT: %.loc14_22.2: %i32 = converted %int.sadd, %.loc14_22.1 [template = constants.%int_3.1] // CHECK:STDOUT: %int.convert_checked.loc14_22: init Core.IntLiteral = call %Convert.specific_fn.loc14_22(%.loc14_22.2) [template = constants.%int_3.2] @@ -162,28 +146,24 @@ let c: [i32; ConvertToU32(3)]* = &a; // CHECK:STDOUT: %a.var: ref %array_type = var a // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var // 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: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_3.loc15: Core.IntLiteral = int_value 3 [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc15_9.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_9.2: type = converted %int.make_type_signed.loc15, %.loc15_9.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc15: type = array_type %int_3.loc15, %i32 [template = constants.%array_type] // CHECK:STDOUT: %ptr.loc15: type = ptr_type %array_type [template = constants.%ptr] // 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: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ConvertToU32.ref: %ConvertToU32.type = name_ref ConvertToU32, %ConvertToU32.decl [template = constants.%ConvertToU32] // CHECK:STDOUT: %int_3.loc16: Core.IntLiteral = int_value 3 [template = constants.%int_3.2] -// CHECK:STDOUT: %impl.elem0.loc16_27: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc16_27: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc16_27: = bound_method %int_3.loc16, %impl.elem0.loc16_27 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc16_27: = specific_function %Convert.bound.loc16_27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc16_27: init %i32 = call %Convert.specific_fn.loc16_27(%int_3.loc16) [template = constants.%int_3.1] // CHECK:STDOUT: %.loc16_27.1: %i32 = value_of_initializer %int.convert_checked.loc16_27 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc16_27.2: %i32 = converted %int_3.loc16, %.loc16_27.1 [template = constants.%int_3.1] // CHECK:STDOUT: %int.convert_checked.loc16_28.1: init %u32 = call %ConvertToU32.ref(%.loc16_27.2) [template = constants.%int_3.3] -// CHECK:STDOUT: %.loc16_9.1: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_9.2: type = converted %int.make_type_signed.loc16, %.loc16_9.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc16_28: %Convert.type.6 = interface_witness_access constants.%interface.11, element0 [template = constants.%Convert.16] +// CHECK:STDOUT: %impl.elem0.loc16_28: %Convert.type.5 = interface_witness_access constants.%interface.11, element0 [template = constants.%Convert.16] // CHECK:STDOUT: %Convert.bound.loc16_28: = bound_method %int.convert_checked.loc16_28.1, %impl.elem0.loc16_28 [template = constants.%Convert.bound.5] -// CHECK:STDOUT: %Convert.specific_fn.loc16_28: = specific_function %Convert.bound.loc16_28, @Convert.5(constants.%int_32) [template = constants.%Convert.specific_fn.5] +// CHECK:STDOUT: %Convert.specific_fn.loc16_28: = specific_function %Convert.bound.loc16_28, @Convert.8(constants.%int_32) [template = constants.%Convert.specific_fn.5] // CHECK:STDOUT: %.loc16_28.1: %u32 = value_of_initializer %int.convert_checked.loc16_28.1 [template = constants.%int_3.3] // CHECK:STDOUT: %.loc16_28.2: %u32 = converted %int.convert_checked.loc16_28.1, %.loc16_28.1 [template = constants.%int_3.3] // CHECK:STDOUT: %int.convert_checked.loc16_28.2: init Core.IntLiteral = call %Convert.specific_fn.loc16_28(%.loc16_28.2) [template = constants.%int_3.2] @@ -193,7 +173,7 @@ let c: [i32; ConvertToU32(3)]* = &a; // CHECK:STDOUT: %ptr.loc16: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Add(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.sadd"; +// CHECK:STDOUT: fn @Add.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.sadd"; // CHECK:STDOUT: // CHECK:STDOUT: fn @ConvertToU32(%a.param_patt: %i32) -> %u32 = "int.convert_checked"; // CHECK:STDOUT: @@ -203,7 +183,7 @@ let c: [i32; ConvertToU32(3)]* = &a; // CHECK:STDOUT: %int_2.loc14_31: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.2] // CHECK:STDOUT: %.loc14_35.1: %tuple.type = tuple_literal (%int_1.loc14_28, %int_2.loc14_31, %int_3) -// CHECK:STDOUT: %impl.elem0.loc14_35.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14_35.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_35.1: = bound_method %int_1.loc14_28, %impl.elem0.loc14_35.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc14_35.1: = specific_function %Convert.bound.loc14_35.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc14_35.1: init %i32 = call %Convert.specific_fn.loc14_35.1(%int_1.loc14_28) [template = constants.%int_1.2] @@ -211,7 +191,7 @@ let c: [i32; ConvertToU32(3)]* = &a; // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %.loc14_35.3: ref %i32 = array_index file.%a.var, %int_0 // CHECK:STDOUT: %.loc14_35.4: init %i32 = initialize_from %.loc14_35.2 to %.loc14_35.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc14_35.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14_35.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_35.2: = bound_method %int_2.loc14_31, %impl.elem0.loc14_35.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc14_35.2: = specific_function %Convert.bound.loc14_35.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc14_35.2: init %i32 = call %Convert.specific_fn.loc14_35.2(%int_2.loc14_31) [template = constants.%int_2.2] @@ -219,7 +199,7 @@ let c: [i32; ConvertToU32(3)]* = &a; // CHECK:STDOUT: %int_1.loc14_35: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc14_35.6: ref %i32 = array_index file.%a.var, %int_1.loc14_35 // CHECK:STDOUT: %.loc14_35.7: init %i32 = initialize_from %.loc14_35.5 to %.loc14_35.6 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc14_35.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14_35.3: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_35.3: = bound_method %int_3, %impl.elem0.loc14_35.3 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc14_35.3: = specific_function %Convert.bound.loc14_35.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc14_35.3: init %i32 = call %Convert.specific_fn.loc14_35.3(%int_3) [template = constants.%int_3.1] diff --git a/toolchain/check/testdata/array/fail_bound_negative.carbon b/toolchain/check/testdata/array/fail_bound_negative.carbon index 800b5a21b462..a262268b7a81 100644 --- a/toolchain/check/testdata/array/fail_bound_negative.carbon +++ b/toolchain/check/testdata/array/fail_bound_negative.carbon @@ -19,33 +19,31 @@ var a: [i32; Negate(1)]; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Negate.type.1: type = fn_type @Negate.1 [template] +// CHECK:STDOUT: %Negate: %Negate.type.1 = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_-1.1: %i32 = int_value -1 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_-1.1, %Convert.15 [template] -// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_-1.1, %Convert.11 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.3(%int_32) [template] // CHECK:STDOUT: %int_-1.2: Core.IntLiteral = int_value -1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -58,41 +56,35 @@ var a: [i32; Negate(1)]; // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %Negate.decl: %Negate.type.1 = fn_decl @Negate.1 [template = constants.%Negate] { // CHECK:STDOUT: %n.patt: %i32 = binding_pattern n // CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%int_32.loc11_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_signed.loc11_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_signed.loc11_14, %.loc11_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_22: init type = call constants.%Int(%int_32.loc11_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_22.1: type = value_of_initializer %int.make_type_signed.loc11_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_22.2: type = converted %int.make_type_signed.loc11_22, %.loc11_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // 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: %Negate.ref: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %Negate.ref: %Negate.type.1 = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc16_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc16_21: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc16_21: = bound_method %int_1, %impl.elem0.loc16_21 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc16_21: = specific_function %Convert.bound.loc16_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc16_21: init %i32 = call %Convert.specific_fn.loc16_21(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc16_21.1: %i32 = value_of_initializer %int.convert_checked.loc16_21 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc16_21.2: %i32 = converted %int_1, %.loc16_21.1 [template = constants.%int_1.2] // CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc16_21.2) [template = constants.%int_-1.1] -// CHECK:STDOUT: %.loc16_9.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_9.2: type = converted %int.make_type_signed, %.loc16_9.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc16_22: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %impl.elem0.loc16_22: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc16_22: = bound_method %int.snegate, %impl.elem0.loc16_22 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc16_22: = specific_function %Convert.bound.loc16_22, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %Convert.specific_fn.loc16_22: = specific_function %Convert.bound.loc16_22, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %.loc16_22.1: %i32 = value_of_initializer %int.snegate [template = constants.%int_-1.1] // CHECK:STDOUT: %.loc16_22.2: %i32 = converted %int.snegate, %.loc16_22.1 [template = constants.%int_-1.1] // CHECK:STDOUT: %int.convert_checked.loc16_22: init Core.IntLiteral = call %Convert.specific_fn.loc16_22(%.loc16_22.2) [template = constants.%int_-1.2] @@ -103,5 +95,5 @@ var a: [i32; Negate(1)]; // CHECK:STDOUT: %a: ref = bind_name a, %a.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Negate(%n.param_patt: %i32) -> %i32 = "int.snegate"; +// CHECK:STDOUT: fn @Negate.1(%n.param_patt: %i32) -> %i32 = "int.snegate"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/array/fail_bound_overflow.carbon b/toolchain/check/testdata/array/fail_bound_overflow.carbon index d2ee2ebd969a..4c2a086cf683 100644 --- a/toolchain/check/testdata/array/fail_bound_overflow.carbon +++ b/toolchain/check/testdata/array/fail_bound_overflow.carbon @@ -26,9 +26,7 @@ var b: [1; 39999999999999999993]; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_39999999999999999993: Core.IntLiteral = int_value 39999999999999999993 [template] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: } @@ -36,7 +34,7 @@ var b: [1; 39999999999999999993]; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -50,10 +48,8 @@ var b: [1; 39999999999999999993]; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_39999999999999999993.loc15: Core.IntLiteral = int_value 39999999999999999993 [template = constants.%int_39999999999999999993] -// CHECK:STDOUT: %.loc15_9.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_9.2: type = converted %int.make_type_signed, %.loc15_9.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc15: type = array_type %int_39999999999999999993.loc15, %i32 [template = ] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var diff --git a/toolchain/check/testdata/array/fail_out_of_bound.carbon b/toolchain/check/testdata/array/fail_out_of_bound.carbon index 6ee019eca07a..2a6703503e50 100644 --- a/toolchain/check/testdata/array/fail_out_of_bound.carbon +++ b/toolchain/check/testdata/array/fail_out_of_bound.carbon @@ -17,9 +17,7 @@ var a: [i32; 1] = (1, 2, 3); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] @@ -29,7 +27,7 @@ var a: [i32; 1] = (1, 2, 3); // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -42,10 +40,8 @@ var a: [i32; 1] = (1, 2, 3); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] -// CHECK:STDOUT: %.loc14_9.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_9.2: type = converted %int.make_type_signed, %.loc14_9.1 [template = constants.%i32] // CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template = constants.%array_type] // CHECK:STDOUT: %a.var: ref %array_type = var a // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var diff --git a/toolchain/check/testdata/array/fail_out_of_bound_non_literal.carbon b/toolchain/check/testdata/array/fail_out_of_bound_non_literal.carbon index d4c2f23e3de3..df76585e2747 100644 --- a/toolchain/check/testdata/array/fail_out_of_bound_non_literal.carbon +++ b/toolchain/check/testdata/array/fail_out_of_bound_non_literal.carbon @@ -18,9 +18,7 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %array_type: type = array_type %int_3.1, %i32 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] @@ -28,16 +26,16 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %int_0: 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.2, %int_2.2, %int_3.2) [template] @@ -48,7 +46,7 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -62,17 +60,13 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed.loc11, %.loc11_9.1 [template = constants.%i32] // CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template = constants.%array_type] // CHECK:STDOUT: %a.var: ref %array_type = var a // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var // 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: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } @@ -83,7 +77,7 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: %int_2.loc11_23: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %int_3.loc11: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc11_27.1: %tuple.type = tuple_literal (%int_1.loc11_20, %int_2.loc11_23, %int_3.loc11) -// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_27.1: = bound_method %int_1.loc11_20, %impl.elem0.loc11_27.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_27.1: = specific_function %Convert.bound.loc11_27.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %Convert.specific_fn.loc11_27.1(%int_1.loc11_20) [template = constants.%int_1.2] @@ -91,7 +85,7 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %.loc11_27.3: ref %i32 = array_index file.%a.var, %int_0 // CHECK:STDOUT: %.loc11_27.4: init %i32 = initialize_from %.loc11_27.2 to %.loc11_27.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_27.2: = bound_method %int_2.loc11_23, %impl.elem0.loc11_27.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_27.2: = specific_function %Convert.bound.loc11_27.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %Convert.specific_fn.loc11_27.2(%int_2.loc11_23) [template = constants.%int_2.2] @@ -99,7 +93,7 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: %int_1.loc11_27: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc11_27.6: ref %i32 = array_index file.%a.var, %int_1.loc11_27 // CHECK:STDOUT: %.loc11_27.7: init %i32 = initialize_from %.loc11_27.5 to %.loc11_27.6 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc11_27.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_27.3: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_27.3: = bound_method %int_3.loc11, %impl.elem0.loc11_27.3 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc11_27.3: = specific_function %Convert.bound.loc11_27.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc11_27.3: init %i32 = call %Convert.specific_fn.loc11_27.3(%int_3.loc11) [template = constants.%int_3.2] @@ -117,18 +111,16 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: %.loc15_27.2: %struct_type.index = converted %.loc15_27.1, %struct [template = constants.%struct] // CHECK:STDOUT: %.loc15_28.1: Core.IntLiteral = struct_access %.loc15_27.2, element0 [template = constants.%int_3.1] // 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: %.loc15_34.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_34.2: type = converted %int.make_type_signed, %.loc15_34.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc15: = bound_method %.loc15_28.1, %impl.elem0.loc15 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc15: = specific_function %Convert.bound.loc15, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %Convert.specific_fn.loc15(%.loc15_28.1) [template = constants.%int_3.2] // CHECK:STDOUT: %.loc15_28.2: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%int_3.2] // CHECK:STDOUT: %.loc15_28.3: %i32 = converted %.loc15_28.1, %.loc15_28.2 [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc15_34.3: ref %i32 = array_index %a.ref, %.loc15_28.3 [template = ] -// CHECK:STDOUT: %.loc15_34.4: %i32 = bind_value %.loc15_34.3 -// CHECK:STDOUT: assign file.%b.var, %.loc15_34.4 +// CHECK:STDOUT: %.loc15_34.1: ref %i32 = array_index %a.ref, %.loc15_28.3 [template = ] +// CHECK:STDOUT: %.loc15_34.2: %i32 = bind_value %.loc15_34.1 +// CHECK:STDOUT: assign file.%b.var, %.loc15_34.2 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/array/fail_type_mismatch.carbon b/toolchain/check/testdata/array/fail_type_mismatch.carbon index 15afe0df36d7..072888fe8dad 100644 --- a/toolchain/check/testdata/array/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/array/fail_type_mismatch.carbon @@ -43,9 +43,7 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] @@ -54,10 +52,10 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: %tuple.type.1: type = tuple_type (Core.IntLiteral, String, String) [template] // CHECK:STDOUT: %int_0: 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (type, type, type) [template] @@ -71,7 +69,7 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -89,54 +87,40 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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: %i32.loc18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_3.loc18: Core.IntLiteral = int_value 3 [template = constants.%int_3] -// 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: %array_type.loc18: type = array_type %int_3.loc18, %i32 [template = constants.%array_type] // CHECK:STDOUT: %a.var: ref %array_type = var a // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var // 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_29.1: %tuple.type.2 = tuple_literal (%int.make_type_signed.loc20, String, String) -// CHECK:STDOUT: %.loc20_29.2: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32] -// CHECK:STDOUT: %.loc20_29.3: type = converted %int.make_type_signed.loc20, %.loc20_29.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc20_29.4: type = converted %.loc20_29.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] +// CHECK:STDOUT: %i32.loc20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc20_29.1: %tuple.type.2 = tuple_literal (%i32.loc20, String, String) +// CHECK:STDOUT: %.loc20_29.2: type = converted %.loc20_29.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] // CHECK:STDOUT: %t1.var: ref %tuple.type.3 = var t1 // CHECK:STDOUT: %t1: ref %tuple.type.3 = bind_name t1, %t1.var // CHECK:STDOUT: %int_32.loc28: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc28: init type = call constants.%Int(%int_32.loc28) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc28: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_3.loc28: Core.IntLiteral = int_value 3 [template = constants.%int_3] -// CHECK:STDOUT: %.loc28_9.1: type = value_of_initializer %int.make_type_signed.loc28 [template = constants.%i32] -// CHECK:STDOUT: %.loc28_9.2: type = converted %int.make_type_signed.loc28, %.loc28_9.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc28: type = array_type %int_3.loc28, %i32 [template = constants.%array_type] // CHECK:STDOUT: %b.var: ref %array_type = var b // CHECK:STDOUT: %b: ref %array_type = bind_name b, %b.var // CHECK:STDOUT: %int_32.loc34: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc34: init type = call constants.%Int(%int_32.loc34) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_3.loc34: Core.IntLiteral = int_value 3 [template = constants.%int_3] -// CHECK:STDOUT: %.loc34_9.1: type = value_of_initializer %int.make_type_signed.loc34 [template = constants.%i32] -// CHECK:STDOUT: %.loc34_9.2: type = converted %int.make_type_signed.loc34, %.loc34_9.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc34: type = array_type %int_3.loc34, %i32 [template = constants.%array_type] // CHECK:STDOUT: %c.var: ref %array_type = var c // CHECK:STDOUT: %c: ref %array_type = bind_name c, %c.var // CHECK:STDOUT: %int_32.loc36_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc36_10: init type = call constants.%Int(%int_32.loc36_10) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc36_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc36_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc36_15: init type = call constants.%Int(%int_32.loc36_15) [template = constants.%i32] -// CHECK:STDOUT: %.loc36_18.1: %tuple.type.6 = tuple_literal (%int.make_type_signed.loc36_10, %int.make_type_signed.loc36_15) -// CHECK:STDOUT: %.loc36_18.2: type = value_of_initializer %int.make_type_signed.loc36_10 [template = constants.%i32] -// CHECK:STDOUT: %.loc36_18.3: type = converted %int.make_type_signed.loc36_10, %.loc36_18.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc36_18.4: type = value_of_initializer %int.make_type_signed.loc36_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc36_18.5: type = converted %int.make_type_signed.loc36_15, %.loc36_18.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc36_18.6: type = converted %.loc36_18.1, constants.%tuple.type.7 [template = constants.%tuple.type.7] +// CHECK:STDOUT: %i32.loc36_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc36_18.1: %tuple.type.6 = tuple_literal (%i32.loc36_10, %i32.loc36_15) +// CHECK:STDOUT: %.loc36_18.2: type = converted %.loc36_18.1, constants.%tuple.type.7 [template = constants.%tuple.type.7] // CHECK:STDOUT: %t2.var: ref %tuple.type.7 = var t2 // CHECK:STDOUT: %t2: ref %tuple.type.7 = bind_name t2, %t2.var // CHECK:STDOUT: %int_32.loc40: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc40: init type = call constants.%Int(%int_32.loc40) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_3.loc40: Core.IntLiteral = int_value 3 [template = constants.%int_3] -// CHECK:STDOUT: %.loc40_9.1: type = value_of_initializer %int.make_type_signed.loc40 [template = constants.%i32] -// CHECK:STDOUT: %.loc40_9.2: type = converted %int.make_type_signed.loc40, %.loc40_9.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc40: type = array_type %int_3.loc40, %i32 [template = constants.%array_type] // CHECK:STDOUT: %d.var: ref %array_type = var d // CHECK:STDOUT: %d: ref %array_type = bind_name d, %d.var @@ -148,7 +132,7 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: %str.loc18_23: String = string_literal "Hello" [template = constants.%str.1] // CHECK:STDOUT: %str.loc18_32: String = string_literal "World" [template = constants.%str.2] // CHECK:STDOUT: %.loc18_39.1: %tuple.type.1 = tuple_literal (%int_1.loc18, %str.loc18_23, %str.loc18_32) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.loc18, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_1.loc18) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/array/function_param.carbon b/toolchain/check/testdata/array/function_param.carbon index 6c6857b42996..e0cd796efac2 100644 --- a/toolchain/check/testdata/array/function_param.carbon +++ b/toolchain/check/testdata/array/function_param.carbon @@ -20,9 +20,7 @@ fn G() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %array_type: type = array_type %int_3.1, %i32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -34,16 +32,16 @@ fn G() -> i32 { // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %int_0: 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.2, %int_2.2, %int_3.2) [template] @@ -52,7 +50,7 @@ fn G() -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -74,19 +72,13 @@ fn G() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_12: init type = call constants.%Int(%int_32.loc11_12) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc11_12.1: type = value_of_initializer %int.make_type_signed.loc11_12 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_12.2: type = converted %int.make_type_signed.loc11_12, %.loc11_12.1 [template = constants.%i32] // CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template = constants.%array_type] // CHECK:STDOUT: %int_32.loc11_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_24: init type = call constants.%Int(%int_32.loc11_24) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_24.1: type = value_of_initializer %int.make_type_signed.loc11_24 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_24.2: type = converted %int.make_type_signed.loc11_24, %.loc11_24.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_24: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_32: init type = call constants.%Int(%int_32.loc11_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_32.1: type = value_of_initializer %int.make_type_signed.loc11_32 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_32.2: type = converted %int.make_type_signed.loc11_32, %.loc11_32.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %arr.param: %array_type = value_param runtime_param0 // CHECK:STDOUT: %arr: %array_type = bind_name arr, %arr.param // CHECK:STDOUT: %i.param: %i32 = value_param runtime_param1 @@ -99,9 +91,7 @@ fn G() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc15_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_11.2: type = converted %int.make_type_signed, %.loc15_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -112,13 +102,11 @@ fn G() -> i32 { // CHECK:STDOUT: %arr.ref: %array_type = name_ref arr, %arr // CHECK:STDOUT: %i.ref: %i32 = name_ref i, %i // 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_15.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_15.2: type = converted %int.make_type_signed.loc12, %.loc12_15.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_15.3: ref %array_type = value_as_ref %arr.ref -// CHECK:STDOUT: %.loc12_15.4: ref %i32 = array_index %.loc12_15.3, %i.ref -// CHECK:STDOUT: %.loc12_15.5: %i32 = bind_value %.loc12_15.4 -// CHECK:STDOUT: return %.loc12_15.5 +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_15.1: ref %array_type = value_as_ref %arr.ref +// CHECK:STDOUT: %.loc12_15.2: ref %i32 = array_index %.loc12_15.1, %i.ref +// CHECK:STDOUT: %.loc12_15.3: %i32 = bind_value %.loc12_15.2 +// CHECK:STDOUT: return %.loc12_15.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> %i32 { @@ -129,7 +117,7 @@ fn G() -> i32 { // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc16_20.1: %tuple.type = tuple_literal (%int_1.loc16_13, %int_2.loc16_16, %int_3) // CHECK:STDOUT: %int_1.loc16_23: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc16_20.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc16_20.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc16_20.1: = bound_method %int_1.loc16_13, %impl.elem0.loc16_20.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc16_20.1: = specific_function %Convert.bound.loc16_20.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc16_20.1: init %i32 = call %Convert.specific_fn.loc16_20.1(%int_1.loc16_13) [template = constants.%int_1.2] @@ -138,7 +126,7 @@ fn G() -> i32 { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %.loc16_20.4: ref %i32 = array_index %.loc16_20.3, %int_0 // CHECK:STDOUT: %.loc16_20.5: init %i32 = initialize_from %.loc16_20.2 to %.loc16_20.4 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc16_20.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc16_20.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc16_20.2: = bound_method %int_2.loc16_16, %impl.elem0.loc16_20.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc16_20.2: = specific_function %Convert.bound.loc16_20.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc16_20.2: init %i32 = call %Convert.specific_fn.loc16_20.2(%int_2.loc16_16) [template = constants.%int_2.2] @@ -146,7 +134,7 @@ fn G() -> i32 { // CHECK:STDOUT: %int_1.loc16_20: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc16_20.7: ref %i32 = array_index %.loc16_20.3, %int_1.loc16_20 // CHECK:STDOUT: %.loc16_20.8: init %i32 = initialize_from %.loc16_20.6 to %.loc16_20.7 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc16_20.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc16_20.3: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc16_20.3: = bound_method %int_3, %impl.elem0.loc16_20.3 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc16_20.3: = specific_function %Convert.bound.loc16_20.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc16_20.3: init %i32 = call %Convert.specific_fn.loc16_20.3(%int_3) [template = constants.%int_3.2] @@ -158,7 +146,7 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc16_20.13: init %array_type = converted %.loc16_20.1, %.loc16_20.12 [template = constants.%array] // CHECK:STDOUT: %.loc16_20.14: ref %array_type = temporary %.loc16_20.3, %.loc16_20.13 // CHECK:STDOUT: %.loc16_20.15: %array_type = bind_value %.loc16_20.14 -// CHECK:STDOUT: %impl.elem0.loc16_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc16_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc16_23: = bound_method %int_1.loc16_23, %impl.elem0.loc16_23 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc16_23: = specific_function %Convert.bound.loc16_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc16_23: init %i32 = call %Convert.specific_fn.loc16_23(%int_1.loc16_23) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/array/import.carbon b/toolchain/check/testdata/array/import.carbon index c2779e390fd6..386005f97f55 100644 --- a/toolchain/check/testdata/array/import.carbon +++ b/toolchain/check/testdata/array/import.carbon @@ -26,9 +26,7 @@ fn G(n: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [template] // CHECK:STDOUT: %array_type: type = array_type %int_42, %i32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -37,7 +35,7 @@ fn G(n: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -54,10 +52,8 @@ fn G(n: i32) -> i32 { // CHECK:STDOUT: %return.param_patt: %array_type = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [template = constants.%int_42] -// CHECK:STDOUT: %.loc4_12.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_12.2: type = converted %int.make_type_signed, %.loc4_12.1 [template = constants.%i32] // CHECK:STDOUT: %array_type: type = array_type %int_42, %i32 [template = constants.%array_type] // CHECK:STDOUT: %return.param: ref %array_type = out_param runtime_param0 // CHECK:STDOUT: %return: ref %array_type = return_slot %return.param @@ -70,9 +66,7 @@ fn G(n: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -105,13 +99,9 @@ fn G(n: i32) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc4_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_9: init type = call constants.%Int(%int_32.loc4_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_9.1: type = value_of_initializer %int.make_type_signed.loc4_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_9.2: type = converted %int.make_type_signed.loc4_9, %.loc4_9.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_17: init type = call constants.%Int(%int_32.loc4_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_17.1: type = value_of_initializer %int.make_type_signed.loc4_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_17.2: type = converted %int.make_type_signed.loc4_17, %.loc4_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -127,12 +117,10 @@ fn G(n: i32) -> i32 { // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n // CHECK:STDOUT: %.loc5_12.2: ref %array_type = temporary %.loc5_12.1, %F.call // 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: ref %i32 = array_index %.loc5_12.2, %n.ref -// CHECK:STDOUT: %.loc5_15.4: %i32 = bind_value %.loc5_15.3 -// CHECK:STDOUT: return %.loc5_15.4 +// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_15.1: ref %i32 = array_index %.loc5_12.2, %n.ref +// CHECK:STDOUT: %.loc5_15.2: %i32 = bind_value %.loc5_15.1 +// CHECK:STDOUT: return %.loc5_15.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %array_type [from "library.carbon"]; diff --git a/toolchain/check/testdata/array/index_not_literal.carbon b/toolchain/check/testdata/array/index_not_literal.carbon index 02dcf910bcc2..686467082887 100644 --- a/toolchain/check/testdata/array/index_not_literal.carbon +++ b/toolchain/check/testdata/array/index_not_literal.carbon @@ -15,9 +15,7 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %array_type: type = array_type %int_3.1, %i32 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] @@ -25,16 +23,16 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %int_0: 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.2, %int_2.2, %int_3.2) [template] @@ -45,7 +43,7 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -59,17 +57,13 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed.loc11, %.loc11_9.1 [template = constants.%i32] // CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template = constants.%array_type] // CHECK:STDOUT: %a.var: ref %array_type = var a // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var // 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_8.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_signed.loc12, %.loc12_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } @@ -80,7 +74,7 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: %int_2.loc11_23: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc11_27.1: %tuple.type = tuple_literal (%int_1.loc11_20, %int_2.loc11_23, %int_3) -// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_27.1: = bound_method %int_1.loc11_20, %impl.elem0.loc11_27.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_27.1: = specific_function %Convert.bound.loc11_27.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %Convert.specific_fn.loc11_27.1(%int_1.loc11_20) [template = constants.%int_1.2] @@ -88,7 +82,7 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %.loc11_27.3: ref %i32 = array_index file.%a.var, %int_0 // CHECK:STDOUT: %.loc11_27.4: init %i32 = initialize_from %.loc11_27.2 to %.loc11_27.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_27.2: = bound_method %int_2.loc11_23, %impl.elem0.loc11_27.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_27.2: = specific_function %Convert.bound.loc11_27.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %Convert.specific_fn.loc11_27.2(%int_2.loc11_23) [template = constants.%int_2.2] @@ -96,7 +90,7 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: %int_1.loc11_27: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc11_27.6: ref %i32 = array_index file.%a.var, %int_1.loc11_27 // CHECK:STDOUT: %.loc11_27.7: init %i32 = initialize_from %.loc11_27.5 to %.loc11_27.6 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc11_27.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_27.3: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_27.3: = bound_method %int_3, %impl.elem0.loc11_27.3 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc11_27.3: = specific_function %Convert.bound.loc11_27.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc11_27.3: init %i32 = call %Convert.specific_fn.loc11_27.3(%int_3) [template = constants.%int_3.2] @@ -114,18 +108,16 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: %.loc12_27.2: %struct_type.index = converted %.loc12_27.1, %struct [template = constants.%struct] // CHECK:STDOUT: %.loc12_28.1: Core.IntLiteral = struct_access %.loc12_27.2, element0 [template = constants.%int_2.1] // 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: %.loc12_34.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_34.2: type = converted %int.make_type_signed, %.loc12_34.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12: = bound_method %.loc12_28.1, %impl.elem0.loc12 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc12: = specific_function %Convert.bound.loc12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %Convert.specific_fn.loc12(%.loc12_28.1) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc12_28.2: %i32 = value_of_initializer %int.convert_checked.loc12 [template = constants.%int_2.2] // CHECK:STDOUT: %.loc12_28.3: %i32 = converted %.loc12_28.1, %.loc12_28.2 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc12_34.3: ref %i32 = array_index %a.ref, %.loc12_28.3 -// CHECK:STDOUT: %.loc12_34.4: %i32 = bind_value %.loc12_34.3 -// CHECK:STDOUT: assign file.%b.var, %.loc12_34.4 +// CHECK:STDOUT: %.loc12_34.1: ref %i32 = array_index %a.ref, %.loc12_28.3 +// CHECK:STDOUT: %.loc12_34.2: %i32 = bind_value %.loc12_34.1 +// CHECK:STDOUT: assign file.%b.var, %.loc12_34.2 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/array/nine_elements.carbon b/toolchain/check/testdata/array/nine_elements.carbon index bc6485d89df4..cd514aa9c9f7 100644 --- a/toolchain/check/testdata/array/nine_elements.carbon +++ b/toolchain/check/testdata/array/nine_elements.carbon @@ -14,9 +14,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_9.1: Core.IntLiteral = int_value 9 [template] // CHECK:STDOUT: %array_type: type = array_type %int_9.1, %i32 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] @@ -30,34 +28,34 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %int_0: 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_4.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] -// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_5.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.5: = specific_function %Convert.bound.5, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] -// CHECK:STDOUT: %Convert.bound.6: = bound_method %int_6.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.6: = bound_method %int_6.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.6: = specific_function %Convert.bound.6, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_6.2: %i32 = int_value 6 [template] -// CHECK:STDOUT: %Convert.bound.7: = bound_method %int_7.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.7: = bound_method %int_7.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.7: = specific_function %Convert.bound.7, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_7.2: %i32 = int_value 7 [template] -// CHECK:STDOUT: %Convert.bound.8: = bound_method %int_8.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.8: = bound_method %int_8.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.8: = specific_function %Convert.bound.8, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_8.2: %i32 = int_value 8 [template] -// CHECK:STDOUT: %Convert.bound.9: = bound_method %int_9.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.9: = bound_method %int_9.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.9: = specific_function %Convert.bound.9, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_9.2: %i32 = int_value 9 [template] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.2, %int_2.2, %int_3.2, %int_4.2, %int_5.2, %int_6.2, %int_7.2, %int_8.2, %int_9.2) [template] @@ -66,7 +64,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -79,10 +77,8 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [template = constants.%int_9.1] -// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed, %.loc11_9.1 [template = constants.%i32] // CHECK:STDOUT: %array_type: type = array_type %int_9, %i32 [template = constants.%array_type] // CHECK:STDOUT: %a.var: ref %array_type = var a // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var @@ -100,7 +96,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %int_8.loc11_41: Core.IntLiteral = int_value 8 [template = constants.%int_8.1] // CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [template = constants.%int_9.1] // CHECK:STDOUT: %.loc11_45.1: %tuple.type = tuple_literal (%int_1.loc11_20, %int_2.loc11_23, %int_3.loc11_26, %int_4.loc11_29, %int_5.loc11_32, %int_6.loc11_35, %int_7.loc11_38, %int_8.loc11_41, %int_9) -// CHECK:STDOUT: %impl.elem0.loc11_45.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_45.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_45.1: = bound_method %int_1.loc11_20, %impl.elem0.loc11_45.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_45.1: = specific_function %Convert.bound.loc11_45.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_45.1: init %i32 = call %Convert.specific_fn.loc11_45.1(%int_1.loc11_20) [template = constants.%int_1.2] @@ -108,7 +104,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %.loc11_45.3: ref %i32 = array_index file.%a.var, %int_0 // CHECK:STDOUT: %.loc11_45.4: init %i32 = initialize_from %.loc11_45.2 to %.loc11_45.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc11_45.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_45.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_45.2: = bound_method %int_2.loc11_23, %impl.elem0.loc11_45.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_45.2: = specific_function %Convert.bound.loc11_45.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_45.2: init %i32 = call %Convert.specific_fn.loc11_45.2(%int_2.loc11_23) [template = constants.%int_2.2] @@ -116,7 +112,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %int_1.loc11_45: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc11_45.6: ref %i32 = array_index file.%a.var, %int_1.loc11_45 // CHECK:STDOUT: %.loc11_45.7: init %i32 = initialize_from %.loc11_45.5 to %.loc11_45.6 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc11_45.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_45.3: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_45.3: = bound_method %int_3.loc11_26, %impl.elem0.loc11_45.3 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc11_45.3: = specific_function %Convert.bound.loc11_45.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc11_45.3: init %i32 = call %Convert.specific_fn.loc11_45.3(%int_3.loc11_26) [template = constants.%int_3.2] @@ -124,7 +120,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %int_2.loc11_45: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc11_45.9: ref %i32 = array_index file.%a.var, %int_2.loc11_45 // CHECK:STDOUT: %.loc11_45.10: init %i32 = initialize_from %.loc11_45.8 to %.loc11_45.9 [template = constants.%int_3.2] -// CHECK:STDOUT: %impl.elem0.loc11_45.4: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_45.4: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_45.4: = bound_method %int_4.loc11_29, %impl.elem0.loc11_45.4 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc11_45.4: = specific_function %Convert.bound.loc11_45.4, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc11_45.4: init %i32 = call %Convert.specific_fn.loc11_45.4(%int_4.loc11_29) [template = constants.%int_4.2] @@ -132,7 +128,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %int_3.loc11_45: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc11_45.12: ref %i32 = array_index file.%a.var, %int_3.loc11_45 // CHECK:STDOUT: %.loc11_45.13: init %i32 = initialize_from %.loc11_45.11 to %.loc11_45.12 [template = constants.%int_4.2] -// CHECK:STDOUT: %impl.elem0.loc11_45.5: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_45.5: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_45.5: = bound_method %int_5.loc11_32, %impl.elem0.loc11_45.5 [template = constants.%Convert.bound.5] // CHECK:STDOUT: %Convert.specific_fn.loc11_45.5: = specific_function %Convert.bound.loc11_45.5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.5] // CHECK:STDOUT: %int.convert_checked.loc11_45.5: init %i32 = call %Convert.specific_fn.loc11_45.5(%int_5.loc11_32) [template = constants.%int_5.2] @@ -140,7 +136,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %int_4.loc11_45: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] // CHECK:STDOUT: %.loc11_45.15: ref %i32 = array_index file.%a.var, %int_4.loc11_45 // CHECK:STDOUT: %.loc11_45.16: init %i32 = initialize_from %.loc11_45.14 to %.loc11_45.15 [template = constants.%int_5.2] -// CHECK:STDOUT: %impl.elem0.loc11_45.6: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_45.6: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_45.6: = bound_method %int_6.loc11_35, %impl.elem0.loc11_45.6 [template = constants.%Convert.bound.6] // CHECK:STDOUT: %Convert.specific_fn.loc11_45.6: = specific_function %Convert.bound.loc11_45.6, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.6] // CHECK:STDOUT: %int.convert_checked.loc11_45.6: init %i32 = call %Convert.specific_fn.loc11_45.6(%int_6.loc11_35) [template = constants.%int_6.2] @@ -148,7 +144,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %int_5.loc11_45: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] // CHECK:STDOUT: %.loc11_45.18: ref %i32 = array_index file.%a.var, %int_5.loc11_45 // CHECK:STDOUT: %.loc11_45.19: init %i32 = initialize_from %.loc11_45.17 to %.loc11_45.18 [template = constants.%int_6.2] -// CHECK:STDOUT: %impl.elem0.loc11_45.7: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_45.7: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_45.7: = bound_method %int_7.loc11_38, %impl.elem0.loc11_45.7 [template = constants.%Convert.bound.7] // CHECK:STDOUT: %Convert.specific_fn.loc11_45.7: = specific_function %Convert.bound.loc11_45.7, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.7] // CHECK:STDOUT: %int.convert_checked.loc11_45.7: init %i32 = call %Convert.specific_fn.loc11_45.7(%int_7.loc11_38) [template = constants.%int_7.2] @@ -156,7 +152,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %int_6.loc11_45: Core.IntLiteral = int_value 6 [template = constants.%int_6.1] // CHECK:STDOUT: %.loc11_45.21: ref %i32 = array_index file.%a.var, %int_6.loc11_45 // CHECK:STDOUT: %.loc11_45.22: init %i32 = initialize_from %.loc11_45.20 to %.loc11_45.21 [template = constants.%int_7.2] -// CHECK:STDOUT: %impl.elem0.loc11_45.8: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_45.8: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_45.8: = bound_method %int_8.loc11_41, %impl.elem0.loc11_45.8 [template = constants.%Convert.bound.8] // CHECK:STDOUT: %Convert.specific_fn.loc11_45.8: = specific_function %Convert.bound.loc11_45.8, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.8] // CHECK:STDOUT: %int.convert_checked.loc11_45.8: init %i32 = call %Convert.specific_fn.loc11_45.8(%int_8.loc11_41) [template = constants.%int_8.2] @@ -164,7 +160,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %int_7.loc11_45: Core.IntLiteral = int_value 7 [template = constants.%int_7.1] // CHECK:STDOUT: %.loc11_45.24: ref %i32 = array_index file.%a.var, %int_7.loc11_45 // CHECK:STDOUT: %.loc11_45.25: init %i32 = initialize_from %.loc11_45.23 to %.loc11_45.24 [template = constants.%int_8.2] -// CHECK:STDOUT: %impl.elem0.loc11_45.9: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_45.9: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_45.9: = bound_method %int_9, %impl.elem0.loc11_45.9 [template = constants.%Convert.bound.9] // CHECK:STDOUT: %Convert.specific_fn.loc11_45.9: = specific_function %Convert.bound.loc11_45.9, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.9] // CHECK:STDOUT: %int.convert_checked.loc11_45.9: init %i32 = call %Convert.specific_fn.loc11_45.9(%int_9) [template = constants.%int_9.2] diff --git a/toolchain/check/testdata/as/adapter_conversion.carbon b/toolchain/check/testdata/as/adapter_conversion.carbon index f12a256395ea..df56a25ad0da 100644 --- a/toolchain/check/testdata/as/adapter_conversion.carbon +++ b/toolchain/check/testdata/as/adapter_conversion.carbon @@ -110,25 +110,23 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %A.elem: type = unbound_element_type %A, %i32 [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %Make: %Make.type = struct_value () [template] // CHECK:STDOUT: %struct_type.x.y.1: type = struct_type {.x: %i32, .y: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x.y.1 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.x.y.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.x.y.2: type = struct_type {.x: Core.IntLiteral, .y: 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %A.val: %A = struct_value (%int_1.2, %int_2.2) [template] @@ -139,7 +137,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -173,15 +171,11 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: // CHECK:STDOUT: class @A { // 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_10.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_signed.loc5, %.loc5_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_8: %A.elem = field_decl x, element0 [template] +// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5: %A.elem = field_decl x, element0 [template] // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.2: type = converted %int.make_type_signed.loc6, %.loc6_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8: %A.elem = field_decl y, element1 [template] +// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc6: %A.elem = field_decl y, element1 [template] // CHECK:STDOUT: %Make.decl: %Make.type = fn_decl @Make [template = constants.%Make] { // CHECK:STDOUT: %return.patt: %A = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %A = out_param_pattern %return.patt, runtime_param0 @@ -190,12 +184,12 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %return.param: ref %A = out_param runtime_param0 // CHECK:STDOUT: %return: ref %A = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.y.1 [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.y.1 [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A -// CHECK:STDOUT: .x = %.loc5_8 -// CHECK:STDOUT: .y = %.loc6_8 +// CHECK:STDOUT: .x = %.loc5 +// CHECK:STDOUT: .y = %.loc6 // CHECK:STDOUT: .Make = %Make.decl // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } @@ -203,7 +197,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: class @B { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: adapt_decl %A.ref [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.y.1 [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.y.1 [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -215,14 +209,14 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc9_27.1: %struct_type.x.y.2 = struct_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc9_27.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_27.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_27.1: = bound_method %int_1, %impl.elem0.loc9_27.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc9_27.1: = specific_function %Convert.bound.loc9_27.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc9_27.1: init %i32 = call %Convert.specific_fn.loc9_27.1(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc9_27.2: init %i32 = converted %int_1, %int.convert_checked.loc9_27.1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc9_27.3: ref %i32 = class_element_access %return, element0 // CHECK:STDOUT: %.loc9_27.4: init %i32 = initialize_from %.loc9_27.2 to %.loc9_27.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc9_27.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_27.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_27.2: = bound_method %int_2, %impl.elem0.loc9_27.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc9_27.2: = specific_function %Convert.bound.loc9_27.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc9_27.2: init %i32 = call %Convert.specific_fn.loc9_27.2(%int_2) [template = constants.%int_2.2] @@ -239,14 +233,14 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc17_31.1: %struct_type.x.y.2 = struct_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc17_31.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc17_31.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc17_31.1: = bound_method %int_1, %impl.elem0.loc17_31.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc17_31.1: = specific_function %Convert.bound.loc17_31.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc17_31.1: init %i32 = call %Convert.specific_fn.loc17_31.1(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc17_31.2: init %i32 = converted %int_1, %int.convert_checked.loc17_31.1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc17_31.3: ref %i32 = class_element_access file.%a_ref.var, element0 // CHECK:STDOUT: %.loc17_31.4: init %i32 = initialize_from %.loc17_31.2 to %.loc17_31.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc17_31.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc17_31.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc17_31.2: = bound_method %int_2, %impl.elem0.loc17_31.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc17_31.2: = specific_function %Convert.bound.loc17_31.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc17_31.2: init %i32 = call %Convert.specific_fn.loc17_31.2(%int_2) [template = constants.%int_2.2] @@ -286,24 +280,23 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [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, %int_32 [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %i32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32.builtin [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @As(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.7, @impl.5(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.7(%int_32) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.5, @impl.3(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.5(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .As = %import_ref.2 +// CHECK:STDOUT: .As = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -320,18 +313,14 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} {} // CHECK:STDOUT: %A.ref: type = name_ref A, %A.decl [template = constants.%A] // 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: %.loc9_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc9_8.2: type = converted %int.make_type_signed, %.loc9_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { // 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: %.loc5_12.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc5_12.2: type = converted %int.make_type_signed, %.loc5_12.1 [template = constants.%i32] -// CHECK:STDOUT: adapt_decl %.loc5_12.2 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %i32 [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: adapt_decl %i32 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %i32.builtin [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -342,12 +331,10 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_32.loc8) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_18.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_18.2: type = converted %int.make_type_signed.loc8, %.loc8_18.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %i32.loc8: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.7(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.5(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc8_15.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_1.2] // CHECK:STDOUT: %.loc8_15.2: %i32 = converted %int_1, %.loc8_15.1 [template = constants.%int_1.2] @@ -357,9 +344,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %a: %A = bind_name a, %.loc8_23.2 // CHECK:STDOUT: %a.ref: %A = name_ref a, %a // CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%int_32.loc9) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_19.1: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_19.2: type = converted %int.make_type_signed.loc9, %.loc9_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc9_16.1: %i32 = as_compatible %a.ref // CHECK:STDOUT: %.loc9_16.2: %i32 = converted %a.ref, %.loc9_16.1 // CHECK:STDOUT: %n: %i32 = bind_name n, %.loc9_16.2 @@ -459,24 +444,22 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %A.elem: type = unbound_element_type %A, %i32 [template] // CHECK:STDOUT: %struct_type.x.y.1: type = struct_type {.x: %i32, .y: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x.y.1 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.x.y.1 [template] // CHECK:STDOUT: %B: type = class_type @B [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.x.y.2: type = struct_type {.x: Core.IntLiteral, .y: 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %A.val: %A = struct_value (%int_1.2, %int_2.2) [template] @@ -485,7 +468,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -510,28 +493,24 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: // CHECK:STDOUT: class @A { // 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_10.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_signed.loc5, %.loc5_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_8: %A.elem = field_decl x, element0 [template] +// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5: %A.elem = field_decl x, element0 [template] // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.2: type = converted %int.make_type_signed.loc6, %.loc6_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8: %A.elem = field_decl y, element1 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.y.1 [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc6: %A.elem = field_decl y, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.y.1 [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A -// CHECK:STDOUT: .x = %.loc5_8 -// CHECK:STDOUT: .y = %.loc6_8 +// CHECK:STDOUT: .x = %.loc5 +// CHECK:STDOUT: .y = %.loc6 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: adapt_decl %A.ref [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.y.1 [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.y.1 [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -544,7 +523,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %int_2.loc13: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc13_34.1: %struct_type.x.y.2 = struct_literal (%int_1.loc13, %int_2.loc13) // CHECK:STDOUT: %A.ref.loc13: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %impl.elem0.loc13_34.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13_34.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13_34.1: = bound_method %int_1.loc13, %impl.elem0.loc13_34.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc13_34.1: = specific_function %Convert.bound.loc13_34.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc13_34.1: init %i32 = call %Convert.specific_fn.loc13_34.1(%int_1.loc13) [template = constants.%int_1.2] @@ -552,7 +531,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %.loc13_34.3: ref %A = temporary_storage // CHECK:STDOUT: %.loc13_34.4: ref %i32 = class_element_access %.loc13_34.3, element0 // CHECK:STDOUT: %.loc13_34.5: init %i32 = initialize_from %.loc13_34.2 to %.loc13_34.4 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc13_34.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13_34.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13_34.2: = bound_method %int_2.loc13, %impl.elem0.loc13_34.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc13_34.2: = specific_function %Convert.bound.loc13_34.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc13_34.2: init %i32 = call %Convert.specific_fn.loc13_34.2(%int_2.loc13) [template = constants.%int_2.2] @@ -571,7 +550,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %int_2.loc24: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc24_33.1: %struct_type.x.y.2 = struct_literal (%int_1.loc24, %int_2.loc24) // CHECK:STDOUT: %A.ref.loc24: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %impl.elem0.loc24_33.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc24_33.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc24_33.1: = bound_method %int_1.loc24, %impl.elem0.loc24_33.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc24_33.1: = specific_function %Convert.bound.loc24_33.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc24_33.1: init %i32 = call %Convert.specific_fn.loc24_33.1(%int_1.loc24) [template = constants.%int_1.2] @@ -579,7 +558,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %.loc24_33.3: ref %A = temporary_storage // CHECK:STDOUT: %.loc24_33.4: ref %i32 = class_element_access %.loc24_33.3, element0 // CHECK:STDOUT: %.loc24_33.5: init %i32 = initialize_from %.loc24_33.2 to %.loc24_33.4 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc24_33.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc24_33.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc24_33.2: = bound_method %int_2.loc24, %impl.elem0.loc24_33.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc24_33.2: = specific_function %Convert.bound.loc24_33.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc24_33.2: init %i32 = call %Convert.specific_fn.loc24_33.2(%int_2.loc24) [template = constants.%int_2.2] @@ -602,12 +581,10 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %A.elem: type = unbound_element_type %A, %i32 [template] // CHECK:STDOUT: %struct_type.x.1: type = struct_type {.x: %i32} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.1 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.x.1 [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %struct_type.x.2: type = struct_type {.x: Core.IntLiteral} [template] @@ -616,7 +593,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .As = %import_ref.2 +// CHECK:STDOUT: .As = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -639,22 +616,20 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: // CHECK:STDOUT: class @A { // 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: %.loc5_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_signed, %.loc5_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_8: %A.elem = field_decl x, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.1 [template = constants.%complete_type] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5: %A.elem = field_decl x, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.1 [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A -// CHECK:STDOUT: .x = %.loc5_8 +// CHECK:STDOUT: .x = %.loc5 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: adapt_decl %A.ref [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.1 [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.1 [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B diff --git a/toolchain/check/testdata/as/as_type.carbon b/toolchain/check/testdata/as/as_type.carbon index b1a35bcd670d..c0e0cad4aa92 100644 --- a/toolchain/check/testdata/as/as_type.carbon +++ b/toolchain/check/testdata/as/as_type.carbon @@ -14,16 +14,14 @@ let t: type = (i32, i32) as type; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [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: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -40,16 +38,12 @@ let t: type = (i32, i32) as type; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_32.loc11_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_16: init type = call constants.%Int(%int_32.loc11_16) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_21: init type = call constants.%Int(%int_32.loc11_21) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_24: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_16, %int.make_type_signed.loc11_21) -// CHECK:STDOUT: %.loc11_26.1: type = value_of_initializer %int.make_type_signed.loc11_16 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_26.2: type = converted %int.make_type_signed.loc11_16, %.loc11_26.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_26.3: type = value_of_initializer %int.make_type_signed.loc11_21 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_26.4: type = converted %int.make_type_signed.loc11_21, %.loc11_26.3 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_26.5: type = converted %.loc11_24, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %t: type = bind_name t, %.loc11_26.5 +// CHECK:STDOUT: %i32.loc11_21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_24: %tuple.type.1 = tuple_literal (%i32.loc11_16, %i32.loc11_21) +// CHECK:STDOUT: %.loc11_26: type = converted %.loc11_24, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %t: type = bind_name t, %.loc11_26 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/as/basic.carbon b/toolchain/check/testdata/as/basic.carbon index ec86080656be..7093353206ac 100644 --- a/toolchain/check/testdata/as/basic.carbon +++ b/toolchain/check/testdata/as/basic.carbon @@ -16,25 +16,23 @@ fn Main() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @As(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.7, @impl.5(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.7(%int_32) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.5, @impl.3(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.5(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .As = %import_ref.2 +// CHECK:STDOUT: .As = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -51,9 +49,7 @@ fn Main() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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_14.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_signed.loc11, %.loc11_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [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,12 +59,10 @@ fn Main() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // 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_15.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_15.2: type = converted %int.make_type_signed.loc12, %.loc12_15.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.7(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.5(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc12_12.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_1.2] // CHECK:STDOUT: %.loc12_12.2: %i32 = converted %int_1, %.loc12_12.1 [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/as/fail_no_conversion.carbon b/toolchain/check/testdata/as/fail_no_conversion.carbon index 5bfd2ebcdaba..69e583751d47 100644 --- a/toolchain/check/testdata/as/fail_no_conversion.carbon +++ b/toolchain/check/testdata/as/fail_no_conversion.carbon @@ -20,9 +20,7 @@ let n: (i32, i32) = 1 as (i32, i32); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [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: %int_1: Core.IntLiteral = int_value 1 [template] @@ -31,7 +29,7 @@ let n: (i32, i32) = 1 as (i32, i32); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .As = %import_ref.2 +// CHECK:STDOUT: .As = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -44,30 +42,22 @@ let n: (i32, i32) = 1 as (i32, i32); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int_32.loc17_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc17_9: init type = call constants.%Int(%int_32.loc17_9) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc17_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc17_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc17_14: init type = call constants.%Int(%int_32.loc17_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc17_9, %int.make_type_signed.loc17_14) -// CHECK:STDOUT: %.loc17_17.2: type = value_of_initializer %int.make_type_signed.loc17_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_17.3: type = converted %int.make_type_signed.loc17_9, %.loc17_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_17.4: type = value_of_initializer %int.make_type_signed.loc17_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_17.5: type = converted %int.make_type_signed.loc17_14, %.loc17_17.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_17.6: type = converted %.loc17_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc17_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc17_17.1: %tuple.type.1 = tuple_literal (%i32.loc17_9, %i32.loc17_14) +// CHECK:STDOUT: %.loc17_17.2: type = converted %.loc17_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] // CHECK:STDOUT: %int_32.loc17_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc17_27: init type = call constants.%Int(%int_32.loc17_27) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc17_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc17_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc17_32: init type = call constants.%Int(%int_32.loc17_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_35.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc17_27, %int.make_type_signed.loc17_32) -// CHECK:STDOUT: %.loc17_35.2: type = value_of_initializer %int.make_type_signed.loc17_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_35.3: type = converted %int.make_type_signed.loc17_27, %.loc17_35.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_35.4: type = value_of_initializer %int.make_type_signed.loc17_32 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_35.5: type = converted %int.make_type_signed.loc17_32, %.loc17_35.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_35.6: type = converted %.loc17_35.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc17_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc17_35.1: %tuple.type.1 = tuple_literal (%i32.loc17_27, %i32.loc17_32) +// CHECK:STDOUT: %.loc17_35.2: type = converted %.loc17_35.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %.loc17_23: %tuple.type.2 = converted %int_1, [template = ] // CHECK:STDOUT: %tuple.elem0: %i32 = tuple_access %.loc17_23, element0 [template = ] // CHECK:STDOUT: %n: %tuple.type.2 = bind_name n, diff --git a/toolchain/check/testdata/as/fail_not_type.carbon b/toolchain/check/testdata/as/fail_not_type.carbon index bc2c00c5ee85..18c0aa0bdcf9 100644 --- a/toolchain/check/testdata/as/fail_not_type.carbon +++ b/toolchain/check/testdata/as/fail_not_type.carbon @@ -20,9 +20,7 @@ let n: i32 = 1 as 2; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: } @@ -30,7 +28,7 @@ let n: i32 = 1 as 2; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -43,9 +41,7 @@ let n: i32 = 1 as 2; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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: %.loc17_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc17_8.2: type = converted %int.make_type_signed, %.loc17_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { diff --git a/toolchain/check/testdata/as/overloaded.carbon b/toolchain/check/testdata/as/overloaded.carbon index a831731d918c..8212121495e5 100644 --- a/toolchain/check/testdata/as/overloaded.carbon +++ b/toolchain/check/testdata/as/overloaded.carbon @@ -27,12 +27,10 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: constants { // CHECK:STDOUT: %X: type = class_type @X [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %X.elem: type = unbound_element_type %X, %i32 [template] // CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.n [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.n [template] // CHECK:STDOUT: %As.type.1: type = generic_interface_type @As [template] // CHECK:STDOUT: %As.generic: %As.type.1 = struct_value () [template] // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%X)> [template] @@ -46,11 +44,11 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @As(%i32) [template] // CHECK:STDOUT: %interface.2: = interface_witness (%Convert.4) [template] // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %Convert.type.17: type = fn_type @Convert.9, @impl.7(%int_32) [template] -// CHECK:STDOUT: %Convert.17: %Convert.type.17 = struct_value () [template] -// CHECK:STDOUT: %interface.11: = interface_witness (%Convert.17) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_4.1, %Convert.17 [template] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound.1, @Convert.9(%int_32) [template] +// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.7, @impl.5(%int_32) [template] +// CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] +// CHECK:STDOUT: %interface.7: = interface_witness (%Convert.13) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_4.1, %Convert.13 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound.1, @Convert.7(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: %Convert.bound.2: = bound_method %int_4.2, %Convert.2 [template] // CHECK:STDOUT: } @@ -58,11 +56,11 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .As = %import_ref.2 +// CHECK:STDOUT: .As = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: %As.type.1 = import_ref Core//prelude/operators/as, As, loaded [template = constants.%As.generic] +// CHECK:STDOUT: %import_ref.5: %As.type.1 = import_ref Core//prelude/operators/as, As, loaded [template = constants.%As.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -75,31 +73,25 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %X.decl: type = class_decl @X [template = constants.%X] {} {} // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // 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: %.loc15_6.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_6.2: type = converted %int.make_type_signed, %.loc15_6.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %As.ref: %As.type.1 = name_ref As, imports.%import_ref.2 [template = constants.%As.generic] +// CHECK:STDOUT: %As.ref: %As.type.1 = name_ref As, imports.%import_ref.5 [template = constants.%As.generic] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(constants.%X)> [template = constants.%As.type.3] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %As.ref: %As.type.1 = name_ref As, imports.%import_ref.2 [template = constants.%As.generic] +// CHECK:STDOUT: %As.ref: %As.type.1 = name_ref As, imports.%import_ref.5 [template = constants.%As.generic] // 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: %.loc19_22.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc19_22.2: type = converted %int.make_type_signed, %.loc19_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(constants.%i32)> [template = constants.%As.type.4] // CHECK:STDOUT: } // 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: %.loc23_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc23_8.2: type = converted %int.make_type_signed, %.loc23_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: %.loc15_6.2 as %As.type { +// CHECK:STDOUT: impl @impl.1: %i32 as %As.type { // CHECK:STDOUT: %Convert.decl: %Convert.type.2 = fn_decl @Convert.2 [template = constants.%Convert.2] { // CHECK:STDOUT: %self.patt: %i32 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %i32 = value_param_pattern %self.patt, runtime_param0 @@ -107,9 +99,7 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %return.param_patt: %X = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // 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: %.loc16_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_20.2: type = converted %int.make_type_signed, %.loc16_20.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %self.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %self: %i32 = bind_name self, %self.param @@ -132,9 +122,7 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: } { // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // 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: %.loc20_28.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc20_28.2: type = converted %int.make_type_signed, %.loc20_28.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param: %X = value_param runtime_param0 // CHECK:STDOUT: %self: %X = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -149,15 +137,13 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: // CHECK:STDOUT: class @X { // 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: %.loc12_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed, %.loc12_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8: %X.elem = field_decl n, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12: %X.elem = field_decl n, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%X -// CHECK:STDOUT: .n = %.loc12_8 +// CHECK:STDOUT: .n = %.loc12 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -175,7 +161,7 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: fn @Convert.3[%self.param_patt: %X]() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %X = name_ref self, %self -// CHECK:STDOUT: %n.ref: %X.elem = name_ref n, @X.%.loc12_8 [template = @X.%.loc12_8] +// CHECK:STDOUT: %n.ref: %X.elem = name_ref n, @X.%.loc12 [template = @X.%.loc12] // CHECK:STDOUT: %.loc20_45.1: ref %i32 = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc20_45.2: %i32 = bind_value %.loc20_45.1 // CHECK:STDOUT: return %.loc20_45.2 @@ -185,12 +171,10 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] // CHECK:STDOUT: %int_32.loc23_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc23_21: init type = call constants.%Int(%int_32.loc23_21) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_21.1: type = value_of_initializer %int.make_type_signed.loc23_21 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_21.2: type = converted %int.make_type_signed.loc23_21, %.loc23_21.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc23_18: %Convert.type.5 = interface_witness_access constants.%interface.11, element0 [template = constants.%Convert.17] +// CHECK:STDOUT: %i32.loc23_21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc23_18: %Convert.type.5 = interface_witness_access constants.%interface.7, element0 [template = constants.%Convert.13] // CHECK:STDOUT: %Convert.bound.loc23_18: = bound_method %int_4, %impl.elem0.loc23_18 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound.loc23_18, @Convert.9(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound.loc23_18, @Convert.7(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_4) [template = constants.%int_4.2] // CHECK:STDOUT: %.loc23_18.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_4.2] // CHECK:STDOUT: %.loc23_18.2: %i32 = converted %int_4, %.loc23_18.1 [template = constants.%int_4.2] @@ -201,9 +185,7 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %Convert.call.loc23_26: init %X = call %Convert.bound.loc23_26(%.loc23_18.2) to %.loc23_26.1 // CHECK:STDOUT: %.loc23_26.2: init %X = converted %.loc23_18.2, %Convert.call.loc23_26 // CHECK:STDOUT: %int_32.loc23_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc23_35: init type = call constants.%Int(%int_32.loc23_35) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_35.1: type = value_of_initializer %int.make_type_signed.loc23_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_35.2: type = converted %int.make_type_signed.loc23_35, %.loc23_35.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc23_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %impl.elem0.loc23_32: %Convert.type.5 = interface_witness_access constants.%interface.2, element0 [template = constants.%Convert.4] // CHECK:STDOUT: %Convert.bound.loc23_32: = bound_method %.loc23_26.2, %impl.elem0.loc23_32 // CHECK:STDOUT: %.loc23_26.3: ref %X = temporary %.loc23_26.1, %.loc23_26.2 diff --git a/toolchain/check/testdata/basics/builtin_types.carbon b/toolchain/check/testdata/basics/builtin_types.carbon index 9dca841351c0..33d0bc462bdb 100644 --- a/toolchain/check/testdata/basics/builtin_types.carbon +++ b/toolchain/check/testdata/basics/builtin_types.carbon @@ -17,15 +17,13 @@ var test_type: type = i32; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] @@ -38,8 +36,8 @@ var test_type: type = i32; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 -// CHECK:STDOUT: .Float = %import_ref.38 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 +// CHECK:STDOUT: .Float = %import_ref.193 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -55,9 +53,7 @@ var test_type: type = i32; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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_15.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_15.2: type = converted %int.make_type_signed, %.loc11_15.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %test_i32.var: ref %i32 = var test_i32 // CHECK:STDOUT: %test_i32: ref %i32 = bind_name test_i32, %test_i32.var // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] @@ -73,7 +69,7 @@ var test_type: type = i32; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // 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: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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] @@ -84,8 +80,8 @@ var test_type: type = i32; // CHECK:STDOUT: %str: String = string_literal "Test" [template = constants.%str] // CHECK:STDOUT: %test_str: String = bind_name test_str, %str // 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: assign file.%test_type.var, %int.make_type_signed +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: assign file.%test_type.var, %i32 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/basics/fail_bad_run.carbon b/toolchain/check/testdata/basics/fail_bad_run.carbon index 496d471b4de7..b926d7ef4c38 100644 --- a/toolchain/check/testdata/basics/fail_bad_run.carbon +++ b/toolchain/check/testdata/basics/fail_bad_run.carbon @@ -23,14 +23,12 @@ fn Run() -> String {} // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -50,9 +48,7 @@ fn Run() -> String {} // CHECK:STDOUT: %return: ref String = return_slot %return.param // CHECK:STDOUT: } // 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: %.loc18_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc18_20.2: type = converted %int.make_type_signed, %.loc18_20.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() -> %return.param_patt: String { diff --git a/toolchain/check/testdata/basics/fail_bad_run_2.carbon b/toolchain/check/testdata/basics/fail_bad_run_2.carbon index 1c4a0bb8a9da..e0e7c47161fe 100644 --- a/toolchain/check/testdata/basics/fail_bad_run_2.carbon +++ b/toolchain/check/testdata/basics/fail_bad_run_2.carbon @@ -17,16 +17,14 @@ fn Run(n: i32) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -43,9 +41,7 @@ fn Run(n: i32) {} // CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc14_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_11.2: type = converted %int.make_type_signed, %.loc14_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon b/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon index 34ab40a7b460..3a7a956a7d33 100644 --- a/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon +++ b/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon @@ -41,19 +41,17 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_39999999999999999993.1: Core.IntLiteral = int_value 39999999999999999993 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_39999999999999999993.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_39999999999999999993.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_39999999999999999993.2: %i32 = int_value 39999999999999999993 [template] // CHECK:STDOUT: %int_2147483648.1: Core.IntLiteral = int_value 2147483648 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2147483648.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2147483648.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2147483648.2: %i32 = int_value 2147483648 [template] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] @@ -64,8 +62,8 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 -// CHECK:STDOUT: .Float = %import_ref.38 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 +// CHECK:STDOUT: .Float = %import_ref.193 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -82,17 +80,11 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_8.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_8.2: type = converted %int.make_type_signed.loc21, %.loc21_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc27: init type = call constants.%Int(%int_32.loc27) [template = constants.%i32] -// CHECK:STDOUT: %.loc27_8.1: type = value_of_initializer %int.make_type_signed.loc27 [template = constants.%i32] -// CHECK:STDOUT: %.loc27_8.2: type = converted %int.make_type_signed.loc27, %.loc27_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_64.loc33: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc33: init type = call constants.%Float(%int_64.loc33) [template = f64] // CHECK:STDOUT: %.loc33_8.1: type = value_of_initializer %float.make_type.loc33 [template = f64] @@ -106,7 +98,7 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_39999999999999999993: Core.IntLiteral = int_value 39999999999999999993 [template = constants.%int_39999999999999999993.1] -// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc15: = bound_method %int_39999999999999999993, %impl.elem0.loc15 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc15: = specific_function %Convert.bound.loc15, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %Convert.specific_fn.loc15(%int_39999999999999999993) [template = constants.%int_39999999999999999993.2] @@ -114,7 +106,7 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: %.loc15_34.2: %i32 = converted %int_39999999999999999993, %.loc15_34.1 [template = constants.%int_39999999999999999993.2] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc15_34.2 // CHECK:STDOUT: %int_2147483648.loc21: Core.IntLiteral = int_value 2147483648 [template = constants.%int_2147483648.1] -// CHECK:STDOUT: %impl.elem0.loc21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc21: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc21: = bound_method %int_2147483648.loc21, %impl.elem0.loc21 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc21: = specific_function %Convert.bound.loc21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %Convert.specific_fn.loc21(%int_2147483648.loc21) [template = constants.%int_2147483648.2] @@ -122,7 +114,7 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: %.loc21_27.2: %i32 = converted %int_2147483648.loc21, %.loc21_27.1 [template = constants.%int_2147483648.2] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc21_27.2 // CHECK:STDOUT: %int_2147483648.loc27: Core.IntLiteral = int_value 2147483648 [template = constants.%int_2147483648.1] -// CHECK:STDOUT: %impl.elem0.loc27: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc27: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc27: = bound_method %int_2147483648.loc27, %impl.elem0.loc27 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc27: = specific_function %Convert.bound.loc27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc27: init %i32 = call %Convert.specific_fn.loc27(%int_2147483648.loc27) [template = constants.%int_2147483648.2] diff --git a/toolchain/check/testdata/basics/numeric_literals.carbon b/toolchain/check/testdata/basics/numeric_literals.carbon index 8cc57993a539..052ab63f6f82 100644 --- a/toolchain/check/testdata/basics/numeric_literals.carbon +++ b/toolchain/check/testdata/basics/numeric_literals.carbon @@ -35,9 +35,7 @@ fn F() { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template] // CHECK:STDOUT: %array_type.1: type = array_type %int_6, %i32 [template] // CHECK:STDOUT: %int_8.1: Core.IntLiteral = int_value 8 [template] @@ -46,20 +44,20 @@ fn F() { // CHECK:STDOUT: %tuple.type.1: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %int_0: 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_8.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_8.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_8.2: %i32 = int_value 8 [template] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_9.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_9.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_9.2: %i32 = int_value 9 [template] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2147483647.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template] @@ -81,8 +79,8 @@ fn F() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 -// CHECK:STDOUT: .Float = %import_ref.38 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 +// CHECK:STDOUT: .Float = %import_ref.193 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -100,10 +98,8 @@ fn F() { // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_6.loc14: Core.IntLiteral = int_value 6 [template = constants.%int_6] -// CHECK:STDOUT: %.loc14_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_14.2: type = converted %int.make_type_signed, %.loc14_14.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc14: type = array_type %int_6.loc14, %i32 [template = constants.%array_type.1] // CHECK:STDOUT: %ints.var: ref %array_type.1 = var ints // CHECK:STDOUT: %ints: ref %array_type.1 = bind_name ints, %ints.var @@ -114,7 +110,7 @@ fn F() { // CHECK:STDOUT: %int_2147483647.loc19: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] // CHECK:STDOUT: %int_2147483647.loc20: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] // CHECK:STDOUT: %.loc21_3.1: %tuple.type.1 = tuple_literal (%int_8.loc15, %int_9, %int_8.loc17, %int_8.loc18, %int_2147483647.loc19, %int_2147483647.loc20) -// CHECK:STDOUT: %impl.elem0.loc21_3.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc21_3.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc21_3.1: = bound_method %int_8.loc15, %impl.elem0.loc21_3.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc21_3.1: = specific_function %Convert.bound.loc21_3.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc21_3.1: init %i32 = call %Convert.specific_fn.loc21_3.1(%int_8.loc15) [template = constants.%int_8.2] @@ -122,7 +118,7 @@ fn F() { // CHECK:STDOUT: %int_0.loc21: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %.loc21_3.3: ref %i32 = array_index %ints.var, %int_0.loc21 // CHECK:STDOUT: %.loc21_3.4: init %i32 = initialize_from %.loc21_3.2 to %.loc21_3.3 [template = constants.%int_8.2] -// CHECK:STDOUT: %impl.elem0.loc21_3.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc21_3.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc21_3.2: = bound_method %int_9, %impl.elem0.loc21_3.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc21_3.2: = specific_function %Convert.bound.loc21_3.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc21_3.2: init %i32 = call %Convert.specific_fn.loc21_3.2(%int_9) [template = constants.%int_9.2] @@ -130,7 +126,7 @@ fn F() { // CHECK:STDOUT: %int_1.loc21: Core.IntLiteral = int_value 1 [template = constants.%int_1] // CHECK:STDOUT: %.loc21_3.6: ref %i32 = array_index %ints.var, %int_1.loc21 // CHECK:STDOUT: %.loc21_3.7: init %i32 = initialize_from %.loc21_3.5 to %.loc21_3.6 [template = constants.%int_9.2] -// CHECK:STDOUT: %impl.elem0.loc21_3.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc21_3.3: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc21_3.3: = bound_method %int_8.loc17, %impl.elem0.loc21_3.3 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc21_3.3: = specific_function %Convert.bound.loc21_3.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc21_3.3: init %i32 = call %Convert.specific_fn.loc21_3.3(%int_8.loc17) [template = constants.%int_8.2] @@ -138,7 +134,7 @@ fn F() { // CHECK:STDOUT: %int_2.loc21: Core.IntLiteral = int_value 2 [template = constants.%int_2] // CHECK:STDOUT: %.loc21_3.9: ref %i32 = array_index %ints.var, %int_2.loc21 // CHECK:STDOUT: %.loc21_3.10: init %i32 = initialize_from %.loc21_3.8 to %.loc21_3.9 [template = constants.%int_8.2] -// CHECK:STDOUT: %impl.elem0.loc21_3.4: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc21_3.4: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc21_3.4: = bound_method %int_8.loc18, %impl.elem0.loc21_3.4 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc21_3.4: = specific_function %Convert.bound.loc21_3.4, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc21_3.4: init %i32 = call %Convert.specific_fn.loc21_3.4(%int_8.loc18) [template = constants.%int_8.2] @@ -146,7 +142,7 @@ fn F() { // CHECK:STDOUT: %int_3.loc21: Core.IntLiteral = int_value 3 [template = constants.%int_3] // CHECK:STDOUT: %.loc21_3.12: ref %i32 = array_index %ints.var, %int_3.loc21 // CHECK:STDOUT: %.loc21_3.13: init %i32 = initialize_from %.loc21_3.11 to %.loc21_3.12 [template = constants.%int_8.2] -// CHECK:STDOUT: %impl.elem0.loc21_3.5: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc21_3.5: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc21_3.5: = bound_method %int_2147483647.loc19, %impl.elem0.loc21_3.5 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc21_3.5: = specific_function %Convert.bound.loc21_3.5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc21_3.5: init %i32 = call %Convert.specific_fn.loc21_3.5(%int_2147483647.loc19) [template = constants.%int_2147483647.2] @@ -154,7 +150,7 @@ fn F() { // CHECK:STDOUT: %int_4.loc21: Core.IntLiteral = int_value 4 [template = constants.%int_4] // CHECK:STDOUT: %.loc21_3.15: ref %i32 = array_index %ints.var, %int_4.loc21 // CHECK:STDOUT: %.loc21_3.16: init %i32 = initialize_from %.loc21_3.14 to %.loc21_3.15 [template = constants.%int_2147483647.2] -// CHECK:STDOUT: %impl.elem0.loc21_3.6: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc21_3.6: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc21_3.6: = bound_method %int_2147483647.loc20, %impl.elem0.loc21_3.6 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc21_3.6: = specific_function %Convert.bound.loc21_3.6, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc21_3.6: init %i32 = call %Convert.specific_fn.loc21_3.6(%int_2147483647.loc20) [template = constants.%int_2147483647.2] diff --git a/toolchain/check/testdata/basics/parens.carbon b/toolchain/check/testdata/basics/parens.carbon index 91e02f89f77b..1ef20850d5ac 100644 --- a/toolchain/check/testdata/basics/parens.carbon +++ b/toolchain/check/testdata/basics/parens.carbon @@ -15,19 +15,17 @@ var b: i32 = ((2)); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } @@ -35,7 +33,7 @@ var b: i32 = ((2)); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -49,15 +47,11 @@ var b: i32 = ((2)); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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_8.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_8.2: type = converted %int.make_type_signed.loc11, %.loc11_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // 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_8.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_signed.loc12, %.loc12_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } @@ -65,14 +59,14 @@ var b: i32 = ((2)); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc11: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11: = bound_method %int_1, %impl.elem0.loc11 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11: = specific_function %Convert.bound.loc11, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %Convert.specific_fn.loc11(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc11: init %i32 = converted %int_1, %int.convert_checked.loc11 [template = constants.%int_1.2] // CHECK:STDOUT: assign file.%a.var, %.loc11 // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12: = bound_method %int_2, %impl.elem0.loc12 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc12: = specific_function %Convert.bound.loc12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %Convert.specific_fn.loc12(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/basics/run_i32.carbon b/toolchain/check/testdata/basics/run_i32.carbon index eebb406e6789..4fce75b49abf 100644 --- a/toolchain/check/testdata/basics/run_i32.carbon +++ b/toolchain/check/testdata/basics/run_i32.carbon @@ -14,17 +14,15 @@ fn Run() -> i32 { return 0; } // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -32,7 +30,7 @@ fn Run() -> i32 { return 0; } // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -49,22 +47,18 @@ fn Run() -> i32 { return 0; } // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [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: %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_17.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.2: type = converted %int.make_type_signed, %.loc11_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() -> %i32 { // CHECK:STDOUT: !entry: // 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: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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] diff --git a/toolchain/check/testdata/basics/type_literals.carbon b/toolchain/check/testdata/basics/type_literals.carbon index d46c86b0f53c..2fec59c203ab 100644 --- a/toolchain/check/testdata/basics/type_literals.carbon +++ b/toolchain/check/testdata/basics/type_literals.carbon @@ -33,7 +33,10 @@ var test_i1: i1; // CHECK:STDERR: ^~~ // CHECK:STDERR: var test_i15: i15; -// CHECK:STDERR: fail_iN_bad_width.carbon:[[@LINE+4]]:23: error: integer type width of 1000000000 is greater than the maximum supported width of 8388608 [IntWidthTooLarge] +// CHECK:STDERR: fail_iN_bad_width.carbon:[[@LINE+7]]:23: error: integer type width of 1000000000 is greater than the maximum supported width of 8388608 [IntWidthTooLarge] +// CHECK:STDERR: var test_i1000000000: i1000000000; +// CHECK:STDERR: ^~~~~~~~~~~ +// CHECK:STDERR: fail_iN_bad_width.carbon:[[@LINE+4]]:23: note: in `i1000000000` used here [ResolvingSpecificHere] // CHECK:STDERR: var test_i1000000000: i1000000000; // CHECK:STDERR: ^~~~~~~~~~~ // CHECK:STDERR: @@ -74,7 +77,10 @@ var test_u1: u1; // CHECK:STDERR: ^~~ // CHECK:STDERR: var test_u15: u15; -// CHECK:STDERR: fail_uN_bad_width.carbon:[[@LINE+4]]:23: error: integer type width of 1000000000 is greater than the maximum supported width of 8388608 [IntWidthTooLarge] +// CHECK:STDERR: fail_uN_bad_width.carbon:[[@LINE+7]]:23: error: integer type width of 1000000000 is greater than the maximum supported width of 8388608 [IntWidthTooLarge] +// CHECK:STDERR: var test_u1000000000: u1000000000; +// CHECK:STDERR: ^~~~~~~~~~~ +// CHECK:STDERR: fail_uN_bad_width.carbon:[[@LINE+4]]:23: note: in `u1000000000` used here [ResolvingSpecificHere] // CHECK:STDERR: var test_u1000000000: u1000000000; // CHECK:STDERR: ^~~~~~~~~~~ // CHECK:STDERR: @@ -123,18 +129,16 @@ var test_f128: f128; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_8: Core.IntLiteral = int_value 8 [template] -// CHECK:STDOUT: %Int.type: type = fn_type @Int [template] -// CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i8: type = int_type signed, %int_8 [template] +// CHECK:STDOUT: %i8: type = class_type @Int, @Int(%int_8) [template] // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template] -// CHECK:STDOUT: %i16: type = int_type signed, %int_16 [template] +// CHECK:STDOUT: %i16: type = class_type @Int, @Int(%int_16) [template] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %i64: type = int_type signed, %int_64 [template] +// CHECK:STDOUT: %i64: type = class_type @Int, @Int(%int_64) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -149,21 +153,15 @@ var test_f128: f128; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int_8: Core.IntLiteral = int_value 8 [template = constants.%int_8] -// CHECK:STDOUT: %int.make_type_signed.loc3: init type = call constants.%Int(%int_8) [template = constants.%i8] -// CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %int.make_type_signed.loc3 [template = constants.%i8] -// CHECK:STDOUT: %.loc3_14.2: type = converted %int.make_type_signed.loc3, %.loc3_14.1 [template = constants.%i8] +// CHECK:STDOUT: %i8: type = class_type @Int, @Int(constants.%int_8) [template = constants.%i8] // CHECK:STDOUT: %test_i8.var: ref %i8 = var test_i8 // CHECK:STDOUT: %test_i8: ref %i8 = bind_name test_i8, %test_i8.var // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_16) [template = constants.%i16] -// CHECK:STDOUT: %.loc4_15.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i16] -// CHECK:STDOUT: %.loc4_15.2: type = converted %int.make_type_signed.loc4, %.loc4_15.1 [template = constants.%i16] +// CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [template = constants.%i16] // CHECK:STDOUT: %test_i16.var: ref %i16 = var test_i16 // CHECK:STDOUT: %test_i16: ref %i16 = bind_name test_i16, %test_i16.var // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%int_64) [template = constants.%i64] -// CHECK:STDOUT: %.loc5_15.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i64] -// CHECK:STDOUT: %.loc5_15.2: type = converted %int.make_type_signed.loc5, %.loc5_15.1 [template = constants.%i64] +// CHECK:STDOUT: %i64: type = class_type @Int, @Int(constants.%int_64) [template = constants.%i64] // CHECK:STDOUT: %test_i64.var: ref %i64 = var test_i64 // CHECK:STDOUT: %test_i64: ref %i64 = bind_name test_i64, %test_i64.var // CHECK:STDOUT: } @@ -179,18 +177,16 @@ var test_f128: f128; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_8: Core.IntLiteral = int_value 8 [template] -// CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] -// CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %u8: type = int_type unsigned, %int_8 [template] +// CHECK:STDOUT: %u8: type = class_type @UInt, @UInt(%int_8) [template] // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template] -// CHECK:STDOUT: %u16: type = int_type unsigned, %int_16 [template] +// CHECK:STDOUT: %u16: type = class_type @UInt, @UInt(%int_16) [template] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %u64: type = int_type unsigned, %int_64 [template] +// CHECK:STDOUT: %u64: type = class_type @UInt, @UInt(%int_64) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .UInt = %import_ref +// CHECK:STDOUT: .UInt = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -205,21 +201,15 @@ var test_f128: f128; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int_8: Core.IntLiteral = int_value 8 [template = constants.%int_8] -// CHECK:STDOUT: %int.make_type_unsigned.loc3: init type = call constants.%UInt(%int_8) [template = constants.%u8] -// CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %int.make_type_unsigned.loc3 [template = constants.%u8] -// CHECK:STDOUT: %.loc3_14.2: type = converted %int.make_type_unsigned.loc3, %.loc3_14.1 [template = constants.%u8] +// CHECK:STDOUT: %u8: type = class_type @UInt, @UInt(constants.%int_8) [template = constants.%u8] // CHECK:STDOUT: %test_u8.var: ref %u8 = var test_u8 // CHECK:STDOUT: %test_u8: ref %u8 = bind_name test_u8, %test_u8.var // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %int.make_type_unsigned.loc4: init type = call constants.%UInt(%int_16) [template = constants.%u16] -// CHECK:STDOUT: %.loc4_15.1: type = value_of_initializer %int.make_type_unsigned.loc4 [template = constants.%u16] -// CHECK:STDOUT: %.loc4_15.2: type = converted %int.make_type_unsigned.loc4, %.loc4_15.1 [template = constants.%u16] +// CHECK:STDOUT: %u16: type = class_type @UInt, @UInt(constants.%int_16) [template = constants.%u16] // CHECK:STDOUT: %test_u16.var: ref %u16 = var test_u16 // CHECK:STDOUT: %test_u16: ref %u16 = bind_name test_u16, %test_u16.var // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %int.make_type_unsigned.loc5: init type = call constants.%UInt(%int_64) [template = constants.%u64] -// CHECK:STDOUT: %.loc5_15.1: type = value_of_initializer %int.make_type_unsigned.loc5 [template = constants.%u64] -// CHECK:STDOUT: %.loc5_15.2: type = converted %int.make_type_unsigned.loc5, %.loc5_15.1 [template = constants.%u64] +// CHECK:STDOUT: %u64: type = class_type @UInt, @UInt(constants.%int_64) [template = constants.%u64] // CHECK:STDOUT: %test_u64.var: ref %u64 = var test_u64 // CHECK:STDOUT: %test_u64: ref %u64 = bind_name test_u64, %test_u64.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/float/make_type.carbon b/toolchain/check/testdata/builtins/float/make_type.carbon index b94b72d37f76..7fb8e8f28e4f 100644 --- a/toolchain/check/testdata/builtins/float/make_type.carbon +++ b/toolchain/check/testdata/builtins/float/make_type.carbon @@ -48,16 +48,14 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -76,9 +74,7 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // 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_16.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_16.2: type = converted %int.make_type_signed, %.loc4_16.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %size.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %size: %i32 = bind_name size, %size.param // CHECK:STDOUT: %return.param: ref type = out_param runtime_param1 @@ -94,18 +90,16 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_64.1: Core.IntLiteral = int_value 64 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_64.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_64.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_64.2: %i32 = int_value 64 [template] // CHECK:STDOUT: %float: f64 = float_literal 0 [template] -// CHECK:STDOUT: %Int.type: type = fn_type @Int [template] -// CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %GetFloat.type: type = fn_type @GetFloat [template] // CHECK:STDOUT: %GetFloat: %GetFloat.type = struct_value () [template] // CHECK:STDOUT: } @@ -113,8 +107,8 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Main//types, Float, loaded [template = constants.%Float] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 -// CHECK:STDOUT: .Int = %import_ref.38 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 +// CHECK:STDOUT: .Int = %import_ref.193 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -131,7 +125,7 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Float.ref: %Float.type = name_ref Float, imports.%import_ref.1 [template = constants.%Float] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_64, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_64) [template = constants.%int_64.2] @@ -149,9 +143,7 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // 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: %.loc8_23.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_23.2: type = converted %int.make_type_signed, %.loc8_23.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %dyn_size.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %dyn_size: %i32 = bind_name dyn_size, %dyn_size.param // CHECK:STDOUT: %return.param: ref type = out_param runtime_param1 @@ -184,18 +176,16 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %int_32.1: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32.1 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32.1) [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(%int_32.1) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_32.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32.1) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_32.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32.1) [template] // CHECK:STDOUT: %int_32.2: %i32 = int_value 32 [template] -// CHECK:STDOUT: %Int.type: type = fn_type @Int [template] -// CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %int_64.1: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_64.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_64.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32.1) [template] // CHECK:STDOUT: %int_64.2: %i32 = int_value 64 [template] // CHECK:STDOUT: } @@ -203,8 +193,8 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Main//types, Float, loaded [template = constants.%Float] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 -// CHECK:STDOUT: .Int = %import_ref.38 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 +// CHECK:STDOUT: .Int = %import_ref.193 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -222,7 +212,7 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Float.ref.loc10: %Float.type = name_ref Float, imports.%import_ref.1 [template = constants.%Float] // CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_32.loc10, %impl.elem0 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_32.loc10) [template = constants.%int_32.2] @@ -234,9 +224,7 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: %invalid_float.var: ref = var invalid_float // CHECK:STDOUT: %invalid_float: ref = bind_name invalid_float, %invalid_float.var // CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32.loc12) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_15.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_15.2: type = converted %int.make_type_signed, %.loc12_15.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %dyn_size.var: ref %i32 = var dyn_size // CHECK:STDOUT: %dyn_size: ref %i32 = bind_name dyn_size, %dyn_size.var // CHECK:STDOUT: %Float.ref.loc16: %Float.type = name_ref Float, imports.%import_ref.1 [template = constants.%Float] @@ -254,7 +242,7 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_64, %impl.elem0 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_64) [template = constants.%int_64.2] diff --git a/toolchain/check/testdata/builtins/int/and.carbon b/toolchain/check/testdata/builtins/int/and.carbon index bc568e833de0..be154cb47204 100644 --- a/toolchain/check/testdata/builtins/int/and.carbon +++ b/toolchain/check/testdata/builtins/int/and.carbon @@ -23,30 +23,28 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %And.type: type = fn_type @And [template] // CHECK:STDOUT: %And: %And.type = struct_value () [template] // CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: %int_10.1: Core.IntLiteral = int_value 10 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_10.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_10.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_10.2: %i32 = int_value 10 [template] // CHECK:STDOUT: %int_8.1: %i32 = int_value 8 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_8.1, %Convert.15 [template] -// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_8.1, %Convert.11 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.3(%int_32) [template] // CHECK:STDOUT: %int_8.2: Core.IntLiteral = int_value 8 [template] // CHECK:STDOUT: %array_type: type = array_type %int_8.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -57,7 +55,7 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -81,17 +79,11 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%int_32.loc2_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_signed.loc2_11, %.loc2_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%int_32.loc2_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_signed.loc2_19, %.loc2_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%int_32.loc2_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_signed.loc2_27, %.loc2_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -100,28 +92,26 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // 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: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %And.ref: %And.type = name_ref And, %And.decl [template = constants.%And] // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [template = constants.%int_10.1] -// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_12, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_12) [template = constants.%int_12.2] // CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_12.2] // CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_12, %.loc4_20.1 [template = constants.%int_12.2] -// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int_10, %impl.elem0.loc4_24 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc4_24: init %i32 = call %Convert.specific_fn.loc4_24(%int_10) [template = constants.%int_10.2] // CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%int_10.2] // CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int_10, %.loc4_24.1 [template = constants.%int_10.2] // CHECK:STDOUT: %int.and: init %i32 = call %And.ref(%.loc4_20.2, %.loc4_24.2) [template = constants.%int_8.1] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc4_26: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %impl.elem0.loc4_26: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc4_26: = bound_method %int.and, %impl.elem0.loc4_26 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_26: = specific_function %Convert.bound.loc4_26, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_26: = specific_function %Convert.bound.loc4_26, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %.loc4_26.1: %i32 = value_of_initializer %int.and [template = constants.%int_8.1] // CHECK:STDOUT: %.loc4_26.2: %i32 = converted %int.and, %.loc4_26.1 [template = constants.%int_8.1] // CHECK:STDOUT: %int.convert_checked.loc4_26: init Core.IntLiteral = call %Convert.specific_fn.loc4_26(%.loc4_26.2) [template = constants.%int_8.2] @@ -131,10 +121,8 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var // 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: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_8: Core.IntLiteral = int_value 8 [template = constants.%int_8.2] -// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc5: type = array_type %int_8, %i32 [template = constants.%array_type] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -146,17 +134,11 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 diff --git a/toolchain/check/testdata/builtins/int/complement.carbon b/toolchain/check/testdata/builtins/int/complement.carbon index 6394ed63515b..7ab8b08777fc 100644 --- a/toolchain/check/testdata/builtins/int/complement.carbon +++ b/toolchain/check/testdata/builtins/int/complement.carbon @@ -24,33 +24,31 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Complement.type: type = fn_type @Complement [template] // CHECK:STDOUT: %Complement: %Complement.type = struct_value () [template] // CHECK:STDOUT: %And.type: type = fn_type @And [template] // CHECK:STDOUT: %And: %And.type = struct_value () [template] // CHECK:STDOUT: %int_1193046.1: Core.IntLiteral = int_value 1193046 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1193046.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1193046.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1193046.2: %i32 = int_value 1193046 [template] // CHECK:STDOUT: %int_-1193047: %i32 = int_value -1193047 [template] // CHECK:STDOUT: %int_16777215.1: Core.IntLiteral = int_value 16777215 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_16777215.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_16777215.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_16777215.2: %i32 = int_value 16777215 [template] // CHECK:STDOUT: %int_15584169.1: %i32 = int_value 15584169 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_15584169.1, %Convert.15 [template] -// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_15584169.1, %Convert.11 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.3(%int_32) [template] // CHECK:STDOUT: %int_15584169.2: Core.IntLiteral = int_value 15584169 [template] // CHECK:STDOUT: %array_type: type = array_type %int_15584169.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -61,7 +59,7 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -84,13 +82,9 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc2_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_18: init type = call constants.%Int(%int_32.loc2_18) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_18.1: type = value_of_initializer %int.make_type_signed.loc2_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_18.2: type = converted %int.make_type_signed.loc2_18, %.loc2_18.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_26: init type = call constants.%Int(%int_32.loc2_26) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_26.1: type = value_of_initializer %int.make_type_signed.loc2_26 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_26.2: type = converted %int.make_type_signed.loc2_26, %.loc2_26.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -105,17 +99,11 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc3_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc3_11: init type = call constants.%Int(%int_32.loc3_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc3_11.1: type = value_of_initializer %int.make_type_signed.loc3_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc3_11.2: type = converted %int.make_type_signed.loc3_11, %.loc3_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc3_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc3_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc3_19: init type = call constants.%Int(%int_32.loc3_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc3_19.1: type = value_of_initializer %int.make_type_signed.loc3_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc3_19.2: type = converted %int.make_type_signed.loc3_19, %.loc3_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc3_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc3_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc3_27: init type = call constants.%Int(%int_32.loc3_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc3_27.1: type = value_of_initializer %int.make_type_signed.loc3_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc3_27.2: type = converted %int.make_type_signed.loc3_27, %.loc3_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc3_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -124,11 +112,11 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // 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: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %And.ref: %And.type = name_ref And, %And.decl [template = constants.%And] // CHECK:STDOUT: %Complement.ref: %Complement.type = name_ref Complement, %Complement.decl [template = constants.%Complement] // CHECK:STDOUT: %int_1193046: Core.IntLiteral = int_value 1193046 [template = constants.%int_1193046.1] -// CHECK:STDOUT: %impl.elem0.loc5_31: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc5_31: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc5_31: = bound_method %int_1193046, %impl.elem0.loc5_31 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc5_31: = specific_function %Convert.bound.loc5_31, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc5_31: init %i32 = call %Convert.specific_fn.loc5_31(%int_1193046) [template = constants.%int_1193046.2] @@ -138,18 +126,16 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: %int_16777215: Core.IntLiteral = int_value 16777215 [template = constants.%int_16777215.1] // CHECK:STDOUT: %.loc5_39.1: %i32 = value_of_initializer %int.complement [template = constants.%int_-1193047] // CHECK:STDOUT: %.loc5_39.2: %i32 = converted %int.complement, %.loc5_39.1 [template = constants.%int_-1193047] -// CHECK:STDOUT: %impl.elem0.loc5_42: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc5_42: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc5_42: = bound_method %int_16777215, %impl.elem0.loc5_42 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc5_42: = specific_function %Convert.bound.loc5_42, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc5_42: init %i32 = call %Convert.specific_fn.loc5_42(%int_16777215) [template = constants.%int_16777215.2] // CHECK:STDOUT: %.loc5_42.1: %i32 = value_of_initializer %int.convert_checked.loc5_42 [template = constants.%int_16777215.2] // CHECK:STDOUT: %.loc5_42.2: %i32 = converted %int_16777215, %.loc5_42.1 [template = constants.%int_16777215.2] // CHECK:STDOUT: %int.and: init %i32 = call %And.ref(%.loc5_39.2, %.loc5_42.2) [template = constants.%int_15584169.1] -// CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_signed.loc5, %.loc5_11.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc5_50: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %impl.elem0.loc5_50: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc5_50: = bound_method %int.and, %impl.elem0.loc5_50 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc5_50: = specific_function %Convert.bound.loc5_50, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %Convert.specific_fn.loc5_50: = specific_function %Convert.bound.loc5_50, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %.loc5_50.1: %i32 = value_of_initializer %int.and [template = constants.%int_15584169.1] // CHECK:STDOUT: %.loc5_50.2: %i32 = converted %int.and, %.loc5_50.1 [template = constants.%int_15584169.1] // CHECK:STDOUT: %int.convert_checked.loc5_50: init Core.IntLiteral = call %Convert.specific_fn.loc5_50(%.loc5_50.2) [template = constants.%int_15584169.2] @@ -159,10 +145,8 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_15584169: Core.IntLiteral = int_value 15584169 [template = constants.%int_15584169.2] -// CHECK:STDOUT: %.loc6_13.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_13.2: type = converted %int.make_type_signed.loc6, %.loc6_13.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc6: type = array_type %int_15584169, %i32 [template = constants.%array_type] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -172,13 +156,9 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc8_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc8_19: init type = call constants.%Int(%int_32.loc8_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_19.1: type = value_of_initializer %int.make_type_signed.loc8_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_19.2: type = converted %int.make_type_signed.loc8_19, %.loc8_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc8_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc8_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc8_27: init type = call constants.%Int(%int_32.loc8_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_27.1: type = value_of_initializer %int.make_type_signed.loc8_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_27.2: type = converted %int.make_type_signed.loc8_27, %.loc8_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc8_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 diff --git a/toolchain/check/testdata/builtins/int/convert_checked.carbon b/toolchain/check/testdata/builtins/int/convert_checked.carbon index 19dab04fe00f..31a00ee65264 100644 --- a/toolchain/check/testdata/builtins/int/convert_checked.carbon +++ b/toolchain/check/testdata/builtins/int/convert_checked.carbon @@ -252,16 +252,12 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %NegateI32.type: type = fn_type @NegateI32 [template] // CHECK:STDOUT: %NegateI32: %NegateI32.type = struct_value () [template] // CHECK:STDOUT: %SubI32.type: type = fn_type @SubI32 [template] // CHECK:STDOUT: %SubI32: %SubI32.type = struct_value () [template] -// CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] -// CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %u32: type = int_type unsigned, %int_32 [template] +// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(%int_32) [template] // CHECK:STDOUT: %AddU32.type: type = fn_type @AddU32 [template] // CHECK:STDOUT: %AddU32: %AddU32.type = struct_value () [template] // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [template] @@ -277,10 +273,10 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %IntLiteralToIntLiteral.type: type = fn_type @IntLiteralToIntLiteral [template] // CHECK:STDOUT: %IntLiteralToIntLiteral: %IntLiteralToIntLiteral.type = struct_value () [template] // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template] -// CHECK:STDOUT: %i16: type = int_type signed, %int_16 [template] +// CHECK:STDOUT: %i16: type = class_type @Int, @Int(%int_16) [template] // CHECK:STDOUT: %Int32ToInt16.type: type = fn_type @Int32ToInt16 [template] // CHECK:STDOUT: %Int32ToInt16: %Int32ToInt16.type = struct_value () [template] -// CHECK:STDOUT: %u16: type = int_type unsigned, %int_16 [template] +// CHECK:STDOUT: %u16: type = class_type @UInt, @UInt(%int_16) [template] // CHECK:STDOUT: %Int32ToUint16.type: type = fn_type @Int32ToUint16 [template] // CHECK:STDOUT: %Int32ToUint16: %Int32ToUint16.type = struct_value () [template] // CHECK:STDOUT: %Uint32ToInt16.type: type = fn_type @Uint32ToInt16 [template] @@ -292,10 +288,10 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %IntLiteralToUint16.type: type = fn_type @IntLiteralToUint16 [template] // CHECK:STDOUT: %IntLiteralToUint16: %IntLiteralToUint16.type = struct_value () [template] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %i64: type = int_type signed, %int_64 [template] +// CHECK:STDOUT: %i64: type = class_type @Int, @Int(%int_64) [template] // CHECK:STDOUT: %Int32ToInt64.type: type = fn_type @Int32ToInt64 [template] // CHECK:STDOUT: %Int32ToInt64: %Int32ToInt64.type = struct_value () [template] -// CHECK:STDOUT: %u64: type = int_type unsigned, %int_64 [template] +// CHECK:STDOUT: %u64: type = class_type @UInt, @UInt(%int_64) [template] // CHECK:STDOUT: %Int32ToUint64.type: type = fn_type @Int32ToUint64 [template] // CHECK:STDOUT: %Int32ToUint64: %Int32ToUint64.type = struct_value () [template] // CHECK:STDOUT: %Uint32ToInt64.type: type = fn_type @Uint32ToInt64 [template] @@ -311,7 +307,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .UInt = %import_ref.2 +// CHECK:STDOUT: .UInt = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -350,13 +346,9 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc4_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_17: init type = call constants.%Int(%int_32.loc4_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_17.1: type = value_of_initializer %int.make_type_signed.loc4_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_17.2: type = converted %int.make_type_signed.loc4_17, %.loc4_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_25: init type = call constants.%Int(%int_32.loc4_25) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_25.1: type = value_of_initializer %int.make_type_signed.loc4_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_25.2: type = converted %int.make_type_signed.loc4_25, %.loc4_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -371,17 +363,11 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc5_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_14: init type = call constants.%Int(%int_32.loc5_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_14.1: type = value_of_initializer %int.make_type_signed.loc5_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_14.2: type = converted %int.make_type_signed.loc5_14, %.loc5_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_22: init type = call constants.%Int(%int_32.loc5_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_22.1: type = value_of_initializer %int.make_type_signed.loc5_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_22.2: type = converted %int.make_type_signed.loc5_22, %.loc5_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_30: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_30: init type = call constants.%Int(%int_32.loc5_30) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_30.1: type = value_of_initializer %int.make_type_signed.loc5_30 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_30.2: type = converted %int.make_type_signed.loc5_30, %.loc5_30.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_30: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -398,17 +384,11 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.param_patt: %u32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_unsigned.loc6_14: init type = call constants.%UInt(%int_32.loc6_14) [template = constants.%u32] -// CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_unsigned.loc6_14 [template = constants.%u32] -// CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_unsigned.loc6_14, %.loc6_14.1 [template = constants.%u32] +// CHECK:STDOUT: %u32.loc6_14: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] // CHECK:STDOUT: %int_32.loc6_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_unsigned.loc6_22: init type = call constants.%UInt(%int_32.loc6_22) [template = constants.%u32] -// CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int.make_type_unsigned.loc6_22 [template = constants.%u32] -// CHECK:STDOUT: %.loc6_22.2: type = converted %int.make_type_unsigned.loc6_22, %.loc6_22.1 [template = constants.%u32] +// CHECK:STDOUT: %u32.loc6_22: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] // CHECK:STDOUT: %int_32.loc6_30: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_unsigned.loc6_30: init type = call constants.%UInt(%int_32.loc6_30) [template = constants.%u32] -// CHECK:STDOUT: %.loc6_30.1: type = value_of_initializer %int.make_type_unsigned.loc6_30 [template = constants.%u32] -// CHECK:STDOUT: %.loc6_30.2: type = converted %int.make_type_unsigned.loc6_30, %.loc6_30.1 [template = constants.%u32] +// CHECK:STDOUT: %u32.loc6_30: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] // CHECK:STDOUT: %a.param: %u32 = value_param runtime_param0 // CHECK:STDOUT: %a: %u32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %u32 = value_param runtime_param1 @@ -430,13 +410,9 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc10_20: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc10_20: init type = call constants.%Int(%int_32.loc10_20) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_20.1: type = value_of_initializer %int.make_type_signed.loc10_20 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_20.2: type = converted %int.make_type_signed.loc10_20, %.loc10_20.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc10_20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc10_28: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc10_28: init type = call constants.%Int(%int_32.loc10_28) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_28.1: type = value_of_initializer %int.make_type_signed.loc10_28 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_28.2: type = converted %int.make_type_signed.loc10_28, %.loc10_28.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc10_28: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -449,13 +425,9 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.param_patt: %u32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc11_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32.loc11_21) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_21.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_21.2: type = converted %int.make_type_signed, %.loc11_21.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_32.loc11_29) [template = constants.%u32] -// CHECK:STDOUT: %.loc11_29.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u32] -// CHECK:STDOUT: %.loc11_29.2: type = converted %int.make_type_unsigned, %.loc11_29.1 [template = constants.%u32] +// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %u32 = out_param runtime_param1 @@ -468,13 +440,9 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc12_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_32.loc12_21) [template = constants.%u32] -// CHECK:STDOUT: %.loc12_21.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u32] -// CHECK:STDOUT: %.loc12_21.2: type = converted %int.make_type_unsigned, %.loc12_21.1 [template = constants.%u32] +// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] // CHECK:STDOUT: %int_32.loc12_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32.loc12_29) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_29.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_29.2: type = converted %int.make_type_signed, %.loc12_29.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %u32 = value_param runtime_param0 // CHECK:STDOUT: %a: %u32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -487,13 +455,9 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.param_patt: %u32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc13_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_unsigned.loc13_22: init type = call constants.%UInt(%int_32.loc13_22) [template = constants.%u32] -// CHECK:STDOUT: %.loc13_22.1: type = value_of_initializer %int.make_type_unsigned.loc13_22 [template = constants.%u32] -// CHECK:STDOUT: %.loc13_22.2: type = converted %int.make_type_unsigned.loc13_22, %.loc13_22.1 [template = constants.%u32] +// CHECK:STDOUT: %u32.loc13_22: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] // CHECK:STDOUT: %int_32.loc13_30: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_unsigned.loc13_30: init type = call constants.%UInt(%int_32.loc13_30) [template = constants.%u32] -// CHECK:STDOUT: %.loc13_30.1: type = value_of_initializer %int.make_type_unsigned.loc13_30 [template = constants.%u32] -// CHECK:STDOUT: %.loc13_30.2: type = converted %int.make_type_unsigned.loc13_30, %.loc13_30.1 [template = constants.%u32] +// CHECK:STDOUT: %u32.loc13_30: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] // CHECK:STDOUT: %a.param: %u32 = value_param runtime_param0 // CHECK:STDOUT: %a: %u32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %u32 = out_param runtime_param1 @@ -525,13 +489,9 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.param_patt: %i16 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc18_20: init type = call constants.%Int(%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_20.1: type = value_of_initializer %int.make_type_signed.loc18_20 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_20.2: type = converted %int.make_type_signed.loc18_20, %.loc18_20.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %int.make_type_signed.loc18_28: init type = call constants.%Int(%int_16) [template = constants.%i16] -// CHECK:STDOUT: %.loc18_28.1: type = value_of_initializer %int.make_type_signed.loc18_28 [template = constants.%i16] -// CHECK:STDOUT: %.loc18_28.2: type = converted %int.make_type_signed.loc18_28, %.loc18_28.1 [template = constants.%i16] +// CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [template = constants.%i16] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i16 = out_param runtime_param1 @@ -544,13 +504,9 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.param_patt: %u16 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // 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: %.loc19_21.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc19_21.2: type = converted %int.make_type_signed, %.loc19_21.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_16) [template = constants.%u16] -// CHECK:STDOUT: %.loc19_29.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u16] -// CHECK:STDOUT: %.loc19_29.2: type = converted %int.make_type_unsigned, %.loc19_29.1 [template = constants.%u16] +// CHECK:STDOUT: %u16: type = class_type @UInt, @UInt(constants.%int_16) [template = constants.%u16] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %u16 = out_param runtime_param1 @@ -563,13 +519,9 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.param_patt: %i16 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_32) [template = constants.%u32] -// CHECK:STDOUT: %.loc20_21.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u32] -// CHECK:STDOUT: %.loc20_21.2: type = converted %int.make_type_unsigned, %.loc20_21.1 [template = constants.%u32] +// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_16) [template = constants.%i16] -// CHECK:STDOUT: %.loc20_29.1: type = value_of_initializer %int.make_type_signed [template = constants.%i16] -// CHECK:STDOUT: %.loc20_29.2: type = converted %int.make_type_signed, %.loc20_29.1 [template = constants.%i16] +// CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [template = constants.%i16] // CHECK:STDOUT: %a.param: %u32 = value_param runtime_param0 // CHECK:STDOUT: %a: %u32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i16 = out_param runtime_param1 @@ -582,13 +534,9 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.param_patt: %u16 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_unsigned.loc21_22: init type = call constants.%UInt(%int_32) [template = constants.%u32] -// CHECK:STDOUT: %.loc21_22.1: type = value_of_initializer %int.make_type_unsigned.loc21_22 [template = constants.%u32] -// CHECK:STDOUT: %.loc21_22.2: type = converted %int.make_type_unsigned.loc21_22, %.loc21_22.1 [template = constants.%u32] +// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %int.make_type_unsigned.loc21_30: init type = call constants.%UInt(%int_16) [template = constants.%u16] -// CHECK:STDOUT: %.loc21_30.1: type = value_of_initializer %int.make_type_unsigned.loc21_30 [template = constants.%u16] -// CHECK:STDOUT: %.loc21_30.2: type = converted %int.make_type_unsigned.loc21_30, %.loc21_30.1 [template = constants.%u16] +// CHECK:STDOUT: %u16: type = class_type @UInt, @UInt(constants.%int_16) [template = constants.%u16] // CHECK:STDOUT: %a.param: %u32 = value_param runtime_param0 // CHECK:STDOUT: %a: %u32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %u16 = out_param runtime_param1 @@ -605,9 +553,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %.loc22_36.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] // CHECK:STDOUT: %.loc22_36.2: type = converted %int_literal.make_type, %.loc22_36.1 [template = Core.IntLiteral] // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_16) [template = constants.%i16] -// CHECK:STDOUT: %.loc22_42.1: type = value_of_initializer %int.make_type_signed [template = constants.%i16] -// CHECK:STDOUT: %.loc22_42.2: type = converted %int.make_type_signed, %.loc22_42.1 [template = constants.%i16] +// CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [template = constants.%i16] // CHECK:STDOUT: %a.param: Core.IntLiteral = value_param runtime_param0 // CHECK:STDOUT: %a: Core.IntLiteral = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i16 = out_param runtime_param1 @@ -624,9 +570,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %.loc23_37.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] // CHECK:STDOUT: %.loc23_37.2: type = converted %int_literal.make_type, %.loc23_37.1 [template = Core.IntLiteral] // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_16) [template = constants.%u16] -// CHECK:STDOUT: %.loc23_43.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u16] -// CHECK:STDOUT: %.loc23_43.2: type = converted %int.make_type_unsigned, %.loc23_43.1 [template = constants.%u16] +// CHECK:STDOUT: %u16: type = class_type @UInt, @UInt(constants.%int_16) [template = constants.%u16] // CHECK:STDOUT: %a.param: Core.IntLiteral = value_param runtime_param0 // CHECK:STDOUT: %a: Core.IntLiteral = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %u16 = out_param runtime_param1 @@ -639,13 +583,9 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.param_patt: %i64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc26_20: init type = call constants.%Int(%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc26_20.1: type = value_of_initializer %int.make_type_signed.loc26_20 [template = constants.%i32] -// CHECK:STDOUT: %.loc26_20.2: type = converted %int.make_type_signed.loc26_20, %.loc26_20.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %int.make_type_signed.loc26_28: init type = call constants.%Int(%int_64) [template = constants.%i64] -// CHECK:STDOUT: %.loc26_28.1: type = value_of_initializer %int.make_type_signed.loc26_28 [template = constants.%i64] -// CHECK:STDOUT: %.loc26_28.2: type = converted %int.make_type_signed.loc26_28, %.loc26_28.1 [template = constants.%i64] +// CHECK:STDOUT: %i64: type = class_type @Int, @Int(constants.%int_64) [template = constants.%i64] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i64 = out_param runtime_param1 @@ -658,13 +598,9 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.param_patt: %u64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // 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: %.loc27_21.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc27_21.2: type = converted %int.make_type_signed, %.loc27_21.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_64) [template = constants.%u64] -// CHECK:STDOUT: %.loc27_29.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u64] -// CHECK:STDOUT: %.loc27_29.2: type = converted %int.make_type_unsigned, %.loc27_29.1 [template = constants.%u64] +// CHECK:STDOUT: %u64: type = class_type @UInt, @UInt(constants.%int_64) [template = constants.%u64] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %u64 = out_param runtime_param1 @@ -677,13 +613,9 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.param_patt: %i64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_32) [template = constants.%u32] -// CHECK:STDOUT: %.loc28_21.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u32] -// CHECK:STDOUT: %.loc28_21.2: type = converted %int.make_type_unsigned, %.loc28_21.1 [template = constants.%u32] +// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_64) [template = constants.%i64] -// CHECK:STDOUT: %.loc28_29.1: type = value_of_initializer %int.make_type_signed [template = constants.%i64] -// CHECK:STDOUT: %.loc28_29.2: type = converted %int.make_type_signed, %.loc28_29.1 [template = constants.%i64] +// CHECK:STDOUT: %i64: type = class_type @Int, @Int(constants.%int_64) [template = constants.%i64] // CHECK:STDOUT: %a.param: %u32 = value_param runtime_param0 // CHECK:STDOUT: %a: %u32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i64 = out_param runtime_param1 @@ -696,13 +628,9 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.param_patt: %u64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_unsigned.loc29_22: init type = call constants.%UInt(%int_32) [template = constants.%u32] -// CHECK:STDOUT: %.loc29_22.1: type = value_of_initializer %int.make_type_unsigned.loc29_22 [template = constants.%u32] -// CHECK:STDOUT: %.loc29_22.2: type = converted %int.make_type_unsigned.loc29_22, %.loc29_22.1 [template = constants.%u32] +// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %int.make_type_unsigned.loc29_30: init type = call constants.%UInt(%int_64) [template = constants.%u64] -// CHECK:STDOUT: %.loc29_30.1: type = value_of_initializer %int.make_type_unsigned.loc29_30 [template = constants.%u64] -// CHECK:STDOUT: %.loc29_30.2: type = converted %int.make_type_unsigned.loc29_30, %.loc29_30.1 [template = constants.%u64] +// CHECK:STDOUT: %u64: type = class_type @UInt, @UInt(constants.%int_64) [template = constants.%u64] // CHECK:STDOUT: %a.param: %u32 = value_param runtime_param0 // CHECK:STDOUT: %a: %u32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %u64 = out_param runtime_param1 @@ -715,9 +643,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // 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: %.loc30_25.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc30_25.2: type = converted %int.make_type_signed, %.loc30_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc30_44.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] @@ -734,9 +660,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_32) [template = constants.%u32] -// CHECK:STDOUT: %.loc31_27.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u32] -// CHECK:STDOUT: %.loc31_27.2: type = converted %int.make_type_unsigned, %.loc31_27.1 [template = constants.%u32] +// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc31_46.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] @@ -794,21 +718,19 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Int32ToInt32.type: type = fn_type @Int32ToInt32 [template] // CHECK:STDOUT: %Int32ToInt32: %Int32ToInt32.type = struct_value () [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2147483647.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] // CHECK:STDOUT: %SubI32.type: type = fn_type @SubI32 [template] @@ -817,7 +739,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %NegateI32: %NegateI32.type = struct_value () [template] // CHECK:STDOUT: %int_-2147483647: %i32 = int_value -2147483647 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_-2147483648: %i32 = int_value -2147483648 [template] @@ -855,7 +777,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %import_ref.21 = import_ref Main//int_ops, Uint32ToUintLiteral, unloaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.22 -// CHECK:STDOUT: .ImplicitAs = %import_ref.23 +// CHECK:STDOUT: .ImplicitAs = %import_ref.26 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -893,17 +815,11 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // 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_8.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_8.2: type = converted %int.make_type_signed.loc5, %.loc5_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_signed.loc6, %.loc6_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_signed.loc7, %.loc7_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.4 [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc8_19.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] @@ -926,7 +842,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Int32ToInt32.ref.loc5: %Int32ToInt32.type = name_ref Int32ToInt32, imports.%import_ref.5 [template = constants.%Int32ToInt32] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc5: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc5: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc5: = bound_method %int_0, %impl.elem0.loc5 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc5: = specific_function %Convert.bound.loc5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc5_27: init %i32 = call %Convert.specific_fn.loc5(%int_0) [template = constants.%int_0.2] @@ -938,7 +854,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc5_29.2 // CHECK:STDOUT: %Int32ToInt32.ref.loc6: %Int32ToInt32.type = name_ref Int32ToInt32, imports.%import_ref.5 [template = constants.%Int32ToInt32] // CHECK:STDOUT: %int_2147483647.loc6: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc6: = bound_method %int_2147483647.loc6, %impl.elem0.loc6 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc6: = specific_function %Convert.bound.loc6, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc6_27: init %i32 = call %Convert.specific_fn.loc6(%int_2147483647.loc6) [template = constants.%int_2147483647.2] @@ -952,7 +868,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %SubI32.ref: %SubI32.type = name_ref SubI32, imports.%import_ref.2 [template = constants.%SubI32] // CHECK:STDOUT: %NegateI32.ref.loc7: %NegateI32.type = name_ref NegateI32, imports.%import_ref.1 [template = constants.%NegateI32] // CHECK:STDOUT: %int_2147483647.loc7: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc7_44: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc7_44: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc7_44: = bound_method %int_2147483647.loc7, %impl.elem0.loc7_44 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc7_44: = specific_function %Convert.bound.loc7_44, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc7_44: init %i32 = call %Convert.specific_fn.loc7_44(%int_2147483647.loc7) [template = constants.%int_2147483647.2] @@ -962,7 +878,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int_1.loc7: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc7_55.1: %i32 = value_of_initializer %int.snegate.loc7 [template = constants.%int_-2147483647] // CHECK:STDOUT: %.loc7_55.2: %i32 = converted %int.snegate.loc7, %.loc7_55.1 [template = constants.%int_-2147483647] -// CHECK:STDOUT: %impl.elem0.loc7_58: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc7_58: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc7_58: = bound_method %int_1.loc7, %impl.elem0.loc7_58 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc7_58: = specific_function %Convert.bound.loc7_58, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc7_58: init %i32 = call %Convert.specific_fn.loc7_58(%int_1.loc7) [template = constants.%int_1.2] @@ -979,7 +895,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Int32ToIntLiteral.ref: %Int32ToIntLiteral.type = name_ref Int32ToIntLiteral, imports.%import_ref.20 [template = constants.%Int32ToIntLiteral] // CHECK:STDOUT: %NegateI32.ref.loc8: %NegateI32.type = name_ref NegateI32, imports.%import_ref.1 [template = constants.%NegateI32] // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc8: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc8: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc8: = bound_method %int_1.loc8, %impl.elem0.loc8 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc8: = specific_function %Convert.bound.loc8, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc8_74: init %i32 = call %Convert.specific_fn.loc8(%int_1.loc8) [template = constants.%int_1.2] @@ -1002,23 +918,19 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] -// CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %u32: type = int_type unsigned, %int_32 [template] +// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(%int_32) [template] // CHECK:STDOUT: %Int32ToUint32.type: type = fn_type @Int32ToUint32 [template] // CHECK:STDOUT: %Int32ToUint32: %Int32ToUint32.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_2147483647.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] // CHECK:STDOUT: %int_2147483647.3: %u32 = int_value 2147483647 [template] -// CHECK:STDOUT: %Int.type: type = fn_type @Int [template] -// CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %Uint32ToInt32.type: type = fn_type @Uint32ToInt32 [template] // CHECK:STDOUT: %Uint32ToInt32: %Uint32ToInt32.type = struct_value () [template] // CHECK:STDOUT: } @@ -1047,8 +959,8 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %import_ref.21 = import_ref Main//int_ops, Uint32ToUintLiteral, unloaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .UInt = %import_ref.22 -// CHECK:STDOUT: .ImplicitAs = %import_ref.23 -// CHECK:STDOUT: .Int = %import_ref.59 +// CHECK:STDOUT: .ImplicitAs = %import_ref.29 +// CHECK:STDOUT: .Int = %import_ref.217 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -1084,13 +996,9 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_32.loc5) [template = constants.%u32] -// CHECK:STDOUT: %.loc5_10.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u32] -// CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_unsigned, %.loc5_10.1 [template = constants.%u32] +// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc6_20.2: type = converted %int.make_type_signed, %.loc6_20.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToUint32(%a.param_patt: %i32) -> %u32 = "int.convert_checked" [from "int_ops.carbon"]; @@ -1101,7 +1009,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Int32ToUint32.ref.loc5: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %int_2147483647.loc5: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc5: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc5: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc5: = bound_method %int_2147483647.loc5, %impl.elem0.loc5 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc5: = specific_function %Convert.bound.loc5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc5_30: init %i32 = call %Convert.specific_fn.loc5(%int_2147483647.loc5) [template = constants.%int_2147483647.2] @@ -1114,7 +1022,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Uint32ToInt32.ref: %Uint32ToInt32.type = name_ref Uint32ToInt32, imports.%import_ref.7 [template = constants.%Uint32ToInt32] // CHECK:STDOUT: %Int32ToUint32.ref.loc6: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %int_2147483647.loc6: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc6: = bound_method %int_2147483647.loc6, %impl.elem0.loc6 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc6: = specific_function %Convert.bound.loc6, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc6_54: init %i32 = call %Convert.specific_fn.loc6(%int_2147483647.loc6) [template = constants.%int_2147483647.2] @@ -1134,48 +1042,44 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template] -// CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] -// CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %u16: type = int_type unsigned, %int_16 [template] +// CHECK:STDOUT: %u16: type = class_type @UInt, @UInt(%int_16) [template] // CHECK:STDOUT: %Int32ToUint16.type: type = fn_type @Int32ToUint16 [template] // CHECK:STDOUT: %Int32ToUint16: %Int32ToUint16.type = struct_value () [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %int_0.3: %u16 = int_value 0 [template] // CHECK:STDOUT: %int_65535.1: Core.IntLiteral = int_value 65535 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_65535.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_65535.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_65535.2: %i32 = int_value 65535 [template] // CHECK:STDOUT: %int_65535.3: %u16 = int_value 65535 [template] -// CHECK:STDOUT: %Int.type: type = fn_type @Int [template] -// CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i16: type = int_type signed, %int_16 [template] +// CHECK:STDOUT: %i16: type = class_type @Int, @Int(%int_16) [template] // CHECK:STDOUT: %Int32ToInt16.type: type = fn_type @Int32ToInt16 [template] // CHECK:STDOUT: %Int32ToInt16: %Int32ToInt16.type = struct_value () [template] // CHECK:STDOUT: %int_32767.1: Core.IntLiteral = int_value 32767 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_32767.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_32767.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_32767.2: %i32 = int_value 32767 [template] // CHECK:STDOUT: %int_32767.3: %i16 = int_value 32767 [template] // CHECK:STDOUT: %NegateI32.type: type = fn_type @NegateI32 [template] // CHECK:STDOUT: %NegateI32: %NegateI32.type = struct_value () [template] // CHECK:STDOUT: %int_32768.1: Core.IntLiteral = int_value 32768 [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_32768.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_32768.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_32768.2: %i32 = int_value 32768 [template] // CHECK:STDOUT: %int_-32768.1: %i32 = int_value -32768 [template] // CHECK:STDOUT: %int_-32768.2: %i16 = int_value -32768 [template] // CHECK:STDOUT: %Uint32ToUint16.type: type = fn_type @Uint32ToUint16 [template] // CHECK:STDOUT: %Uint32ToUint16: %Uint32ToUint16.type = struct_value () [template] -// CHECK:STDOUT: %u32: type = int_type unsigned, %int_32 [template] +// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(%int_32) [template] // CHECK:STDOUT: %Int32ToUint32.type: type = fn_type @Int32ToUint32 [template] // CHECK:STDOUT: %Int32ToUint32: %Int32ToUint32.type = struct_value () [template] // CHECK:STDOUT: %int_0.4: %u32 = int_value 0 [template] @@ -1217,8 +1121,8 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %import_ref.21 = import_ref Main//int_ops, Uint32ToUintLiteral, unloaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .UInt = %import_ref.22 -// CHECK:STDOUT: .ImplicitAs = %import_ref.23 -// CHECK:STDOUT: .Int = %import_ref.59 +// CHECK:STDOUT: .ImplicitAs = %import_ref.29 +// CHECK:STDOUT: .Int = %import_ref.217 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -1264,53 +1168,29 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %int_16.loc5: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %int.make_type_unsigned.loc5: init type = call constants.%UInt(%int_16.loc5) [template = constants.%u16] -// CHECK:STDOUT: %.loc5_8.1: type = value_of_initializer %int.make_type_unsigned.loc5 [template = constants.%u16] -// CHECK:STDOUT: %.loc5_8.2: type = converted %int.make_type_unsigned.loc5, %.loc5_8.1 [template = constants.%u16] +// CHECK:STDOUT: %u16.loc5: type = class_type @UInt, @UInt(constants.%int_16) [template = constants.%u16] // CHECK:STDOUT: %int_16.loc6: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %int.make_type_unsigned.loc6: init type = call constants.%UInt(%int_16.loc6) [template = constants.%u16] -// CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_unsigned.loc6 [template = constants.%u16] -// CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_unsigned.loc6, %.loc6_8.1 [template = constants.%u16] +// CHECK:STDOUT: %u16.loc6: type = class_type @UInt, @UInt(constants.%int_16) [template = constants.%u16] // CHECK:STDOUT: %int_16.loc8: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_16.loc8) [template = constants.%i16] -// CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i16] -// CHECK:STDOUT: %.loc8_8.2: type = converted %int.make_type_signed.loc8, %.loc8_8.1 [template = constants.%i16] +// CHECK:STDOUT: %i16.loc8: type = class_type @Int, @Int(constants.%int_16) [template = constants.%i16] // CHECK:STDOUT: %int_16.loc9: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%int_16.loc9) [template = constants.%i16] -// CHECK:STDOUT: %.loc9_8.1: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i16] -// CHECK:STDOUT: %.loc9_8.2: type = converted %int.make_type_signed.loc9, %.loc9_8.1 [template = constants.%i16] +// CHECK:STDOUT: %i16.loc9: type = class_type @Int, @Int(constants.%int_16) [template = constants.%i16] // CHECK:STDOUT: %int_16.loc11: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %int.make_type_unsigned.loc11: init type = call constants.%UInt(%int_16.loc11) [template = constants.%u16] -// CHECK:STDOUT: %.loc11_8.1: type = value_of_initializer %int.make_type_unsigned.loc11 [template = constants.%u16] -// CHECK:STDOUT: %.loc11_8.2: type = converted %int.make_type_unsigned.loc11, %.loc11_8.1 [template = constants.%u16] +// CHECK:STDOUT: %u16.loc11: type = class_type @UInt, @UInt(constants.%int_16) [template = constants.%u16] // CHECK:STDOUT: %int_16.loc12: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %int.make_type_unsigned.loc12: init type = call constants.%UInt(%int_16.loc12) [template = constants.%u16] -// CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_unsigned.loc12 [template = constants.%u16] -// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_unsigned.loc12, %.loc12_8.1 [template = constants.%u16] +// CHECK:STDOUT: %u16.loc12: type = class_type @UInt, @UInt(constants.%int_16) [template = constants.%u16] // CHECK:STDOUT: %int_16.loc14: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%int_16.loc14) [template = constants.%i16] -// CHECK:STDOUT: %.loc14_8.1: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i16] -// CHECK:STDOUT: %.loc14_8.2: type = converted %int.make_type_signed.loc14, %.loc14_8.1 [template = constants.%i16] +// CHECK:STDOUT: %i16.loc14: type = class_type @Int, @Int(constants.%int_16) [template = constants.%i16] // CHECK:STDOUT: %int_16.loc15: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_16.loc15) [template = constants.%i16] -// CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i16] -// CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_signed.loc15, %.loc15_8.1 [template = constants.%i16] +// CHECK:STDOUT: %i16.loc15: type = class_type @Int, @Int(constants.%int_16) [template = constants.%i16] // CHECK:STDOUT: %int_16.loc17: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%int_16.loc17) [template = constants.%i16] -// CHECK:STDOUT: %.loc17_18.1: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i16] -// CHECK:STDOUT: %.loc17_18.2: type = converted %int.make_type_signed.loc17, %.loc17_18.1 [template = constants.%i16] +// CHECK:STDOUT: %i16.loc17: type = class_type @Int, @Int(constants.%int_16) [template = constants.%i16] // CHECK:STDOUT: %int_16.loc18: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %int.make_type_signed.loc18: init type = call constants.%Int(%int_16.loc18) [template = constants.%i16] -// CHECK:STDOUT: %.loc18_18.1: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i16] -// CHECK:STDOUT: %.loc18_18.2: type = converted %int.make_type_signed.loc18, %.loc18_18.1 [template = constants.%i16] +// CHECK:STDOUT: %i16.loc18: type = class_type @Int, @Int(constants.%int_16) [template = constants.%i16] // CHECK:STDOUT: %int_16.loc20: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %int.make_type_unsigned.loc20: init type = call constants.%UInt(%int_16.loc20) [template = constants.%u16] -// CHECK:STDOUT: %.loc20_18.1: type = value_of_initializer %int.make_type_unsigned.loc20 [template = constants.%u16] -// CHECK:STDOUT: %.loc20_18.2: type = converted %int.make_type_unsigned.loc20, %.loc20_18.1 [template = constants.%u16] +// CHECK:STDOUT: %u16.loc20: type = class_type @UInt, @UInt(constants.%int_16) [template = constants.%u16] // CHECK:STDOUT: %int_16.loc21: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %int.make_type_unsigned.loc21: init type = call constants.%UInt(%int_16.loc21) [template = constants.%u16] -// CHECK:STDOUT: %.loc21_18.1: type = value_of_initializer %int.make_type_unsigned.loc21 [template = constants.%u16] -// CHECK:STDOUT: %.loc21_18.2: type = converted %int.make_type_unsigned.loc21, %.loc21_18.1 [template = constants.%u16] +// CHECK:STDOUT: %u16.loc21: type = class_type @UInt, @UInt(constants.%int_16) [template = constants.%u16] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToUint16(%a.param_patt: %i32) -> %u16 = "int.convert_checked" [from "int_ops.carbon"]; @@ -1335,7 +1215,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Int32ToUint16.ref.loc5: %Int32ToUint16.type = name_ref Int32ToUint16, imports.%import_ref.11 [template = constants.%Int32ToUint16] // CHECK:STDOUT: %int_0.loc5: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc5: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc5: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc5: = bound_method %int_0.loc5, %impl.elem0.loc5 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc5: = specific_function %Convert.bound.loc5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc5_28: init %i32 = call %Convert.specific_fn.loc5(%int_0.loc5) [template = constants.%int_0.2] @@ -1347,7 +1227,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %a: %u16 = bind_name a, %.loc5_30.2 // CHECK:STDOUT: %Int32ToUint16.ref.loc6: %Int32ToUint16.type = name_ref Int32ToUint16, imports.%import_ref.11 [template = constants.%Int32ToUint16] // CHECK:STDOUT: %int_65535.loc6: Core.IntLiteral = int_value 65535 [template = constants.%int_65535.1] -// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc6: = bound_method %int_65535.loc6, %impl.elem0.loc6 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc6: = specific_function %Convert.bound.loc6, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc6_28: init %i32 = call %Convert.specific_fn.loc6(%int_65535.loc6) [template = constants.%int_65535.2] @@ -1359,7 +1239,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %b: %u16 = bind_name b, %.loc6_35.2 // CHECK:STDOUT: %Int32ToInt16.ref.loc8: %Int32ToInt16.type = name_ref Int32ToInt16, imports.%import_ref.10 [template = constants.%Int32ToInt16] // CHECK:STDOUT: %int_32767.loc8: Core.IntLiteral = int_value 32767 [template = constants.%int_32767.1] -// CHECK:STDOUT: %impl.elem0.loc8: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc8: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc8: = bound_method %int_32767.loc8, %impl.elem0.loc8 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc8: = specific_function %Convert.bound.loc8, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc8_27: init %i32 = call %Convert.specific_fn.loc8(%int_32767.loc8) [template = constants.%int_32767.2] @@ -1372,7 +1252,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Int32ToInt16.ref.loc9: %Int32ToInt16.type = name_ref Int32ToInt16, imports.%import_ref.10 [template = constants.%Int32ToInt16] // CHECK:STDOUT: %NegateI32.ref.loc9: %NegateI32.type = name_ref NegateI32, imports.%import_ref.1 [template = constants.%NegateI32] // CHECK:STDOUT: %int_32768.loc9: Core.IntLiteral = int_value 32768 [template = constants.%int_32768.1] -// CHECK:STDOUT: %impl.elem0.loc9: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9: = bound_method %int_32768.loc9, %impl.elem0.loc9 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc9: = specific_function %Convert.bound.loc9, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc9_37: init %i32 = call %Convert.specific_fn.loc9(%int_32768.loc9) [template = constants.%int_32768.2] @@ -1388,7 +1268,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Uint32ToUint16.ref.loc11: %Uint32ToUint16.type = name_ref Uint32ToUint16, imports.%import_ref.13 [template = constants.%Uint32ToUint16] // CHECK:STDOUT: %Int32ToUint32.ref.loc11: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %int_0.loc11: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc11: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11: = bound_method %int_0.loc11, %impl.elem0.loc11 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11: = specific_function %Convert.bound.loc11, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_43: init %i32 = call %Convert.specific_fn.loc11(%int_0.loc11) [template = constants.%int_0.2] @@ -1404,7 +1284,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Uint32ToUint16.ref.loc12: %Uint32ToUint16.type = name_ref Uint32ToUint16, imports.%import_ref.13 [template = constants.%Uint32ToUint16] // CHECK:STDOUT: %Int32ToUint32.ref.loc12: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %int_65535.loc12: Core.IntLiteral = int_value 65535 [template = constants.%int_65535.1] -// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12: = bound_method %int_65535.loc12, %impl.elem0.loc12 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc12: = specific_function %Convert.bound.loc12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %Convert.specific_fn.loc12(%int_65535.loc12) [template = constants.%int_65535.2] @@ -1420,7 +1300,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Uint32ToInt16.ref.loc14: %Uint32ToInt16.type = name_ref Uint32ToInt16, imports.%import_ref.12 [template = constants.%Uint32ToInt16] // CHECK:STDOUT: %Int32ToUint32.ref.loc14: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %int_0.loc14: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc14: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14: = bound_method %int_0.loc14, %impl.elem0.loc14 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc14: = specific_function %Convert.bound.loc14, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc14_42: init %i32 = call %Convert.specific_fn.loc14(%int_0.loc14) [template = constants.%int_0.2] @@ -1436,7 +1316,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Uint32ToInt16.ref.loc15: %Uint32ToInt16.type = name_ref Uint32ToInt16, imports.%import_ref.12 [template = constants.%Uint32ToInt16] // CHECK:STDOUT: %Int32ToUint32.ref.loc15: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %int_32767.loc15: Core.IntLiteral = int_value 32767 [template = constants.%int_32767.1] -// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc15: = bound_method %int_32767.loc15, %impl.elem0.loc15 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc15: = specific_function %Convert.bound.loc15, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc15_42: init %i32 = call %Convert.specific_fn.loc15(%int_32767.loc15) [template = constants.%int_32767.2] @@ -1453,7 +1333,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Int32ToIntLiteral.ref.loc17: %Int32ToIntLiteral.type = name_ref Int32ToIntLiteral, imports.%import_ref.20 [template = constants.%Int32ToIntLiteral] // CHECK:STDOUT: %NegateI32.ref.loc17: %NegateI32.type = name_ref NegateI32, imports.%import_ref.1 [template = constants.%NegateI32] // CHECK:STDOUT: %int_32768.loc17: Core.IntLiteral = int_value 32768 [template = constants.%int_32768.1] -// CHECK:STDOUT: %impl.elem0.loc17: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc17: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc17: = bound_method %int_32768.loc17, %impl.elem0.loc17 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc17: = specific_function %Convert.bound.loc17, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc17_70: init %i32 = call %Convert.specific_fn.loc17(%int_32768.loc17) [template = constants.%int_32768.2] @@ -1472,7 +1352,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %IntLiteralToInt16.ref.loc18: %IntLiteralToInt16.type = name_ref IntLiteralToInt16, imports.%import_ref.14 [template = constants.%IntLiteralToInt16] // CHECK:STDOUT: %Int32ToIntLiteral.ref.loc18: %Int32ToIntLiteral.type = name_ref Int32ToIntLiteral, imports.%import_ref.20 [template = constants.%Int32ToIntLiteral] // CHECK:STDOUT: %int_32767.loc18: Core.IntLiteral = int_value 32767 [template = constants.%int_32767.1] -// CHECK:STDOUT: %impl.elem0.loc18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc18: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc18: = bound_method %int_32767.loc18, %impl.elem0.loc18 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc18: = specific_function %Convert.bound.loc18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc18_60: init %i32 = call %Convert.specific_fn.loc18(%int_32767.loc18) [template = constants.%int_32767.2] @@ -1488,7 +1368,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %IntLiteralToUint16.ref.loc20: %IntLiteralToUint16.type = name_ref IntLiteralToUint16, imports.%import_ref.15 [template = constants.%IntLiteralToUint16] // CHECK:STDOUT: %Int32ToIntLiteral.ref.loc20: %Int32ToIntLiteral.type = name_ref Int32ToIntLiteral, imports.%import_ref.20 [template = constants.%Int32ToIntLiteral] // CHECK:STDOUT: %int_0.loc20: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc20: = bound_method %int_0.loc20, %impl.elem0.loc20 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc20: = specific_function %Convert.bound.loc20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc20_61: init %i32 = call %Convert.specific_fn.loc20(%int_0.loc20) [template = constants.%int_0.2] @@ -1504,7 +1384,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %IntLiteralToUint16.ref.loc21: %IntLiteralToUint16.type = name_ref IntLiteralToUint16, imports.%import_ref.15 [template = constants.%IntLiteralToUint16] // CHECK:STDOUT: %Int32ToIntLiteral.ref.loc21: %Int32ToIntLiteral.type = name_ref Int32ToIntLiteral, imports.%import_ref.20 [template = constants.%Int32ToIntLiteral] // CHECK:STDOUT: %int_65535.loc21: Core.IntLiteral = int_value 65535 [template = constants.%int_65535.1] -// CHECK:STDOUT: %impl.elem0.loc21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc21: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc21: = bound_method %int_65535.loc21, %impl.elem0.loc21 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc21: = specific_function %Convert.bound.loc21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc21_61: init %i32 = call %Convert.specific_fn.loc21(%int_65535.loc21) [template = constants.%int_65535.2] @@ -1524,22 +1404,20 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] -// CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %u64: type = int_type unsigned, %int_64 [template] +// CHECK:STDOUT: %u64: type = class_type @UInt, @UInt(%int_64) [template] // CHECK:STDOUT: %Uint32ToUint64.type: type = fn_type @Uint32ToUint64 [template] // CHECK:STDOUT: %Uint32ToUint64: %Uint32ToUint64.type = struct_value () [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %u32: type = int_type unsigned, %int_32 [template] +// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(%int_32) [template] // CHECK:STDOUT: %Int32ToUint32.type: type = fn_type @Int32ToUint32 [template] // CHECK:STDOUT: %Int32ToUint32: %Int32ToUint32.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %int_0.3: %u32 = int_value 0 [template] @@ -1547,21 +1425,19 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %AddU32.type: type = fn_type @AddU32 [template] // CHECK:STDOUT: %AddU32: %AddU32.type = struct_value () [template] // CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2147483647.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] // CHECK:STDOUT: %int_2147483647.3: %u32 = int_value 2147483647 [template] // CHECK:STDOUT: %int_4294967294: %u32 = int_value 4294967294 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_1.3: %u32 = int_value 1 [template] // CHECK:STDOUT: %int_4294967295.1: %u32 = int_value 4294967295 [template] // CHECK:STDOUT: %int_4294967295.2: %u64 = int_value 4294967295 [template] -// CHECK:STDOUT: %Int.type: type = fn_type @Int [template] -// CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i64: type = int_type signed, %int_64 [template] +// CHECK:STDOUT: %i64: type = class_type @Int, @Int(%int_64) [template] // CHECK:STDOUT: %Uint32ToInt64.type: type = fn_type @Uint32ToInt64 [template] // CHECK:STDOUT: %Uint32ToInt64: %Uint32ToInt64.type = struct_value () [template] // CHECK:STDOUT: %int_0.5: %i64 = int_value 0 [template] @@ -1592,8 +1468,8 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %import_ref.21 = import_ref Main//int_ops, Uint32ToUintLiteral, unloaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .UInt = %import_ref.22 -// CHECK:STDOUT: .ImplicitAs = %import_ref.23 -// CHECK:STDOUT: .Int = %import_ref.59 +// CHECK:STDOUT: .ImplicitAs = %import_ref.29 +// CHECK:STDOUT: .Int = %import_ref.217 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -1631,21 +1507,13 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %int_64.loc5: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %int.make_type_unsigned.loc5: init type = call constants.%UInt(%int_64.loc5) [template = constants.%u64] -// CHECK:STDOUT: %.loc5_8.1: type = value_of_initializer %int.make_type_unsigned.loc5 [template = constants.%u64] -// CHECK:STDOUT: %.loc5_8.2: type = converted %int.make_type_unsigned.loc5, %.loc5_8.1 [template = constants.%u64] +// CHECK:STDOUT: %u64.loc5: type = class_type @UInt, @UInt(constants.%int_64) [template = constants.%u64] // CHECK:STDOUT: %int_64.loc6: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %int.make_type_unsigned.loc6: init type = call constants.%UInt(%int_64.loc6) [template = constants.%u64] -// CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_unsigned.loc6 [template = constants.%u64] -// CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_unsigned.loc6, %.loc6_8.1 [template = constants.%u64] +// CHECK:STDOUT: %u64.loc6: type = class_type @UInt, @UInt(constants.%int_64) [template = constants.%u64] // CHECK:STDOUT: %int_64.loc11: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%int_64.loc11) [template = constants.%i64] -// CHECK:STDOUT: %.loc11_8.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i64] -// CHECK:STDOUT: %.loc11_8.2: type = converted %int.make_type_signed.loc11, %.loc11_8.1 [template = constants.%i64] +// CHECK:STDOUT: %i64.loc11: type = class_type @Int, @Int(constants.%int_64) [template = constants.%i64] // CHECK:STDOUT: %int_64.loc12: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%int_64.loc12) [template = constants.%i64] -// CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i64] -// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_signed.loc12, %.loc12_8.1 [template = constants.%i64] +// CHECK:STDOUT: %i64.loc12: type = class_type @Int, @Int(constants.%int_64) [template = constants.%i64] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Uint32ToUint64(%a.param_patt: %u32) -> %u64 = "int.convert_checked" [from "int_ops.carbon"]; @@ -1661,7 +1529,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Uint32ToUint64.ref.loc5: %Uint32ToUint64.type = name_ref Uint32ToUint64, imports.%import_ref.19 [template = constants.%Uint32ToUint64] // CHECK:STDOUT: %Int32ToUint32.ref.loc5: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %int_0.loc5: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc5: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc5: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc5: = bound_method %int_0.loc5, %impl.elem0.loc5 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc5: = specific_function %Convert.bound.loc5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc5_43: init %i32 = call %Convert.specific_fn.loc5(%int_0.loc5) [template = constants.%int_0.2] @@ -1679,7 +1547,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %AddU32.ref.loc8: %AddU32.type = name_ref AddU32, imports.%import_ref.3 [template = constants.%AddU32] // CHECK:STDOUT: %Int32ToUint32.ref.loc8_12: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %int_2147483647.loc8_26: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc8_26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc8_26: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc8_26: = bound_method %int_2147483647.loc8_26, %impl.elem0.loc8_26 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc8_26: = specific_function %Convert.bound.loc8_26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc8_26: init %i32 = call %Convert.specific_fn.loc8_26(%int_2147483647.loc8_26) [template = constants.%int_2147483647.2] @@ -1688,7 +1556,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc8_37: init %u32 = call %Int32ToUint32.ref.loc8_12(%.loc8_26.2) [template = constants.%int_2147483647.3] // CHECK:STDOUT: %Int32ToUint32.ref.loc8_40: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %int_2147483647.loc8_54: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc8_54: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc8_54: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc8_54: = bound_method %int_2147483647.loc8_54, %impl.elem0.loc8_54 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc8_54: = specific_function %Convert.bound.loc8_54, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc8_54: init %i32 = call %Convert.specific_fn.loc8_54(%int_2147483647.loc8_54) [template = constants.%int_2147483647.2] @@ -1702,7 +1570,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.uadd.loc8: init %u32 = call %AddU32.ref.loc8(%.loc8_37.2, %.loc8_65.2) [template = constants.%int_4294967294] // CHECK:STDOUT: %Int32ToUint32.ref.loc9: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc9: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9: = bound_method %int_1.loc9, %impl.elem0.loc9 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc9: = specific_function %Convert.bound.loc9, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc9_19: init %i32 = call %Convert.specific_fn.loc9(%int_1.loc9) [template = constants.%int_1.2] @@ -1723,7 +1591,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Uint32ToInt64.ref.loc11: %Uint32ToInt64.type = name_ref Uint32ToInt64, imports.%import_ref.18 [template = constants.%Uint32ToInt64] // CHECK:STDOUT: %Int32ToUint32.ref.loc11: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %int_0.loc11: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc11: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11: = bound_method %int_0.loc11, %impl.elem0.loc11 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11: = specific_function %Convert.bound.loc11, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_42: init %i32 = call %Convert.specific_fn.loc11(%int_0.loc11) [template = constants.%int_0.2] @@ -1741,7 +1609,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %AddU32.ref.loc14: %AddU32.type = name_ref AddU32, imports.%import_ref.3 [template = constants.%AddU32] // CHECK:STDOUT: %Int32ToUint32.ref.loc14_12: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %int_2147483647.loc14_26: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc14_26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14_26: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_26: = bound_method %int_2147483647.loc14_26, %impl.elem0.loc14_26 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc14_26: = specific_function %Convert.bound.loc14_26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc14_26: init %i32 = call %Convert.specific_fn.loc14_26(%int_2147483647.loc14_26) [template = constants.%int_2147483647.2] @@ -1750,7 +1618,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc14_37: init %u32 = call %Int32ToUint32.ref.loc14_12(%.loc14_26.2) [template = constants.%int_2147483647.3] // CHECK:STDOUT: %Int32ToUint32.ref.loc14_40: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %int_2147483647.loc14_54: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc14_54: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14_54: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_54: = bound_method %int_2147483647.loc14_54, %impl.elem0.loc14_54 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc14_54: = specific_function %Convert.bound.loc14_54, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc14_54: init %i32 = call %Convert.specific_fn.loc14_54(%int_2147483647.loc14_54) [template = constants.%int_2147483647.2] @@ -1764,7 +1632,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.uadd.loc14: init %u32 = call %AddU32.ref.loc14(%.loc14_37.2, %.loc14_65.2) [template = constants.%int_4294967294] // CHECK:STDOUT: %Int32ToUint32.ref.loc15: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc15: = bound_method %int_1.loc15, %impl.elem0.loc15 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc15: = specific_function %Convert.bound.loc15, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc15_19: init %i32 = call %Convert.specific_fn.loc15(%int_1.loc15) [template = constants.%int_1.2] @@ -1789,30 +1657,26 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] -// CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %u64: type = int_type unsigned, %int_64 [template] +// CHECK:STDOUT: %u64: type = class_type @UInt, @UInt(%int_64) [template] // CHECK:STDOUT: %Int32ToUint64.type: type = fn_type @Int32ToUint64 [template] // CHECK:STDOUT: %Int32ToUint64: %Int32ToUint64.type = struct_value () [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %int_0.3: %u64 = int_value 0 [template] // CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2147483647.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] // CHECK:STDOUT: %int_2147483647.3: %u64 = int_value 2147483647 [template] -// CHECK:STDOUT: %Int.type: type = fn_type @Int [template] -// CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i64: type = int_type signed, %int_64 [template] +// CHECK:STDOUT: %i64: type = class_type @Int, @Int(%int_64) [template] // CHECK:STDOUT: %Int32ToInt64.type: type = fn_type @Int32ToInt64 [template] // CHECK:STDOUT: %Int32ToInt64: %Int32ToInt64.type = struct_value () [template] // CHECK:STDOUT: %SubI32.type: type = fn_type @SubI32 [template] @@ -1821,7 +1685,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %NegateI32: %NegateI32.type = struct_value () [template] // CHECK:STDOUT: %int_-2147483647: %i32 = int_value -2147483647 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_-2147483648.1: %i32 = int_value -2147483648 [template] @@ -1853,8 +1717,8 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %import_ref.21 = import_ref Main//int_ops, Uint32ToUintLiteral, unloaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .UInt = %import_ref.22 -// CHECK:STDOUT: .ImplicitAs = %import_ref.23 -// CHECK:STDOUT: .Int = %import_ref.59 +// CHECK:STDOUT: .ImplicitAs = %import_ref.29 +// CHECK:STDOUT: .Int = %import_ref.217 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -1892,21 +1756,13 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %int_64.loc5: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %int.make_type_unsigned.loc5: init type = call constants.%UInt(%int_64.loc5) [template = constants.%u64] -// CHECK:STDOUT: %.loc5_8.1: type = value_of_initializer %int.make_type_unsigned.loc5 [template = constants.%u64] -// CHECK:STDOUT: %.loc5_8.2: type = converted %int.make_type_unsigned.loc5, %.loc5_8.1 [template = constants.%u64] +// CHECK:STDOUT: %u64.loc5: type = class_type @UInt, @UInt(constants.%int_64) [template = constants.%u64] // CHECK:STDOUT: %int_64.loc6: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %int.make_type_unsigned.loc6: init type = call constants.%UInt(%int_64.loc6) [template = constants.%u64] -// CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_unsigned.loc6 [template = constants.%u64] -// CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_unsigned.loc6, %.loc6_8.1 [template = constants.%u64] +// CHECK:STDOUT: %u64.loc6: type = class_type @UInt, @UInt(constants.%int_64) [template = constants.%u64] // CHECK:STDOUT: %int_64.loc8: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_64.loc8) [template = constants.%i64] -// CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i64] -// CHECK:STDOUT: %.loc8_8.2: type = converted %int.make_type_signed.loc8, %.loc8_8.1 [template = constants.%i64] +// CHECK:STDOUT: %i64.loc8: type = class_type @Int, @Int(constants.%int_64) [template = constants.%i64] // CHECK:STDOUT: %int_64.loc9: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%int_64.loc9) [template = constants.%i64] -// CHECK:STDOUT: %.loc9_8.1: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i64] -// CHECK:STDOUT: %.loc9_8.2: type = converted %int.make_type_signed.loc9, %.loc9_8.1 [template = constants.%i64] +// CHECK:STDOUT: %i64.loc9: type = class_type @Int, @Int(constants.%int_64) [template = constants.%i64] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToUint64(%a.param_patt: %i32) -> %u64 = "int.convert_checked" [from "int_ops.carbon"]; @@ -1921,7 +1777,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Int32ToUint64.ref.loc5: %Int32ToUint64.type = name_ref Int32ToUint64, imports.%import_ref.17 [template = constants.%Int32ToUint64] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc5: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc5: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc5: = bound_method %int_0, %impl.elem0.loc5 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc5: = specific_function %Convert.bound.loc5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc5_28: init %i32 = call %Convert.specific_fn.loc5(%int_0) [template = constants.%int_0.2] @@ -1933,7 +1789,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %a: %u64 = bind_name a, %.loc5_30.2 // CHECK:STDOUT: %Int32ToUint64.ref.loc6: %Int32ToUint64.type = name_ref Int32ToUint64, imports.%import_ref.17 [template = constants.%Int32ToUint64] // CHECK:STDOUT: %int_2147483647.loc6: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc6: = bound_method %int_2147483647.loc6, %impl.elem0.loc6 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc6: = specific_function %Convert.bound.loc6, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc6_28: init %i32 = call %Convert.specific_fn.loc6(%int_2147483647.loc6) [template = constants.%int_2147483647.2] @@ -1947,7 +1803,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %SubI32.ref: %SubI32.type = name_ref SubI32, imports.%import_ref.2 [template = constants.%SubI32] // CHECK:STDOUT: %NegateI32.ref: %NegateI32.type = name_ref NegateI32, imports.%import_ref.1 [template = constants.%NegateI32] // CHECK:STDOUT: %int_2147483647.loc8: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc8_44: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc8_44: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc8_44: = bound_method %int_2147483647.loc8, %impl.elem0.loc8_44 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc8_44: = specific_function %Convert.bound.loc8_44, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc8_44: init %i32 = call %Convert.specific_fn.loc8_44(%int_2147483647.loc8) [template = constants.%int_2147483647.2] @@ -1957,7 +1813,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc8_55.1: %i32 = value_of_initializer %int.snegate [template = constants.%int_-2147483647] // CHECK:STDOUT: %.loc8_55.2: %i32 = converted %int.snegate, %.loc8_55.1 [template = constants.%int_-2147483647] -// CHECK:STDOUT: %impl.elem0.loc8_58: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc8_58: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc8_58: = bound_method %int_1, %impl.elem0.loc8_58 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc8_58: = specific_function %Convert.bound.loc8_58, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc8_58: init %i32 = call %Convert.specific_fn.loc8_58(%int_1) [template = constants.%int_1.2] @@ -1972,7 +1828,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %c: %i64 = bind_name c, %.loc8_61.2 // CHECK:STDOUT: %Int32ToInt64.ref.loc9: %Int32ToInt64.type = name_ref Int32ToInt64, imports.%import_ref.16 [template = constants.%Int32ToInt64] // CHECK:STDOUT: %int_2147483647.loc9: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc9: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9: = bound_method %int_2147483647.loc9, %impl.elem0.loc9 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc9: = specific_function %Convert.bound.loc9, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc9_27: init %i32 = call %Convert.specific_fn.loc9(%int_2147483647.loc9) [template = constants.%int_2147483647.2] @@ -1989,27 +1845,25 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Uint32ToInt32.type: type = fn_type @Uint32ToInt32 [template] // CHECK:STDOUT: %Uint32ToInt32: %Uint32ToInt32.type = struct_value () [template] -// CHECK:STDOUT: %u32: type = int_type unsigned, %int_32 [template] +// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(%int_32) [template] // CHECK:STDOUT: %AddU32.type: type = fn_type @AddU32 [template] // CHECK:STDOUT: %AddU32: %AddU32.type = struct_value () [template] // CHECK:STDOUT: %Int32ToUint32.type: type = fn_type @Int32ToUint32 [template] // CHECK:STDOUT: %Int32ToUint32: %Int32ToUint32.type = struct_value () [template] // CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2147483647.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] // CHECK:STDOUT: %int_2147483647.3: %u32 = int_value 2147483647 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_1.3: %u32 = int_value 1 [template] @@ -2041,7 +1895,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %import_ref.21 = import_ref Main//int_ops, Uint32ToUintLiteral, unloaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.22 -// CHECK:STDOUT: .ImplicitAs = %import_ref.23 +// CHECK:STDOUT: .ImplicitAs = %import_ref.29 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -2076,9 +1930,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // 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: %.loc5_19.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_signed, %.loc5_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Uint32ToInt32(%a.param_patt: %u32) -> %i32 = "int.convert_checked" [from "int_ops.carbon"]; @@ -2093,7 +1945,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %AddU32.ref: %AddU32.type = name_ref AddU32, imports.%import_ref.3 [template = constants.%AddU32] // CHECK:STDOUT: %Int32ToUint32.ref.loc11: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %int_2147483647: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc11: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11: = bound_method %int_2147483647, %impl.elem0.loc11 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11: = specific_function %Convert.bound.loc11, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_26: init %i32 = call %Convert.specific_fn.loc11(%int_2147483647) [template = constants.%int_2147483647.2] @@ -2102,7 +1954,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc11_37: init %u32 = call %Int32ToUint32.ref.loc11(%.loc11_26.2) [template = constants.%int_2147483647.3] // CHECK:STDOUT: %Int32ToUint32.ref.loc12: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12: = bound_method %int_1, %impl.elem0.loc12 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc12: = specific_function %Convert.bound.loc12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc12_26: init %i32 = call %Convert.specific_fn.loc12(%int_1) [template = constants.%int_1.2] @@ -2127,19 +1979,17 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template] -// CHECK:STDOUT: %Int.type: type = fn_type @Int [template] -// CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i16: type = int_type signed, %int_16 [template] +// CHECK:STDOUT: %i16: type = class_type @Int, @Int(%int_16) [template] // CHECK:STDOUT: %Int32ToInt16.type: type = fn_type @Int32ToInt16 [template] // CHECK:STDOUT: %Int32ToInt16: %Int32ToInt16.type = struct_value () [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_32768.1: Core.IntLiteral = int_value 32768 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_32768.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_32768.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_32768.2: %i32 = int_value 32768 [template] // CHECK:STDOUT: %int_32768.3: %i16 = int_value 32768 [template] @@ -2169,7 +2019,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %import_ref.21 = import_ref Main//int_ops, Uint32ToUintLiteral, unloaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.22 -// CHECK:STDOUT: .ImplicitAs = %import_ref.23 +// CHECK:STDOUT: .ImplicitAs = %import_ref.26 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -2204,9 +2054,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_16) [template = constants.%i16] -// CHECK:STDOUT: %.loc9_19.1: type = value_of_initializer %int.make_type_signed [template = constants.%i16] -// CHECK:STDOUT: %.loc9_19.2: type = converted %int.make_type_signed, %.loc9_19.1 [template = constants.%i16] +// CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [template = constants.%i16] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToInt16(%a.param_patt: %i32) -> %i16 = "int.convert_checked" [from "int_ops.carbon"]; @@ -2215,7 +2063,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Int32ToInt16.ref: %Int32ToInt16.type = name_ref Int32ToInt16, imports.%import_ref.10 [template = constants.%Int32ToInt16] // CHECK:STDOUT: %int_32768: Core.IntLiteral = int_value 32768 [template = constants.%int_32768.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_32768, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc9_38: init %i32 = call %Convert.specific_fn(%int_32768) [template = constants.%int_32768.2] @@ -2232,19 +2080,17 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template] -// CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] -// CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %u16: type = int_type unsigned, %int_16 [template] +// CHECK:STDOUT: %u16: type = class_type @UInt, @UInt(%int_16) [template] // CHECK:STDOUT: %Int32ToUint16.type: type = fn_type @Int32ToUint16 [template] // CHECK:STDOUT: %Int32ToUint16: %Int32ToUint16.type = struct_value () [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_65536.1: Core.IntLiteral = int_value 65536 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_65536.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_65536.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_65536.2: %i32 = int_value 65536 [template] // CHECK:STDOUT: %int_65536.3: %u16 = int_value 65536 [template] @@ -2274,7 +2120,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %import_ref.21 = import_ref Main//int_ops, Uint32ToUintLiteral, unloaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .UInt = %import_ref.22 -// CHECK:STDOUT: .ImplicitAs = %import_ref.23 +// CHECK:STDOUT: .ImplicitAs = %import_ref.29 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -2309,9 +2155,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_16) [template = constants.%u16] -// CHECK:STDOUT: %.loc9_19.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u16] -// CHECK:STDOUT: %.loc9_19.2: type = converted %int.make_type_unsigned, %.loc9_19.1 [template = constants.%u16] +// CHECK:STDOUT: %u16: type = class_type @UInt, @UInt(constants.%int_16) [template = constants.%u16] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToUint16(%a.param_patt: %i32) -> %u16 = "int.convert_checked" [from "int_ops.carbon"]; @@ -2320,7 +2164,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Int32ToUint16.ref: %Int32ToUint16.type = name_ref Int32ToUint16, imports.%import_ref.11 [template = constants.%Int32ToUint16] // CHECK:STDOUT: %int_65536: Core.IntLiteral = int_value 65536 [template = constants.%int_65536.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_65536, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc9_39: init %i32 = call %Convert.specific_fn(%int_65536) [template = constants.%int_65536.2] @@ -2337,22 +2181,20 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template] -// CHECK:STDOUT: %Int.type: type = fn_type @Int [template] -// CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i16: type = int_type signed, %int_16 [template] +// CHECK:STDOUT: %i16: type = class_type @Int, @Int(%int_16) [template] // CHECK:STDOUT: %Uint32ToInt16.type: type = fn_type @Uint32ToInt16 [template] // CHECK:STDOUT: %Uint32ToInt16: %Uint32ToInt16.type = struct_value () [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %u32: type = int_type unsigned, %int_32 [template] +// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(%int_32) [template] // CHECK:STDOUT: %Int32ToUint32.type: type = fn_type @Int32ToUint32 [template] // CHECK:STDOUT: %Int32ToUint32: %Int32ToUint32.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_32768.1: Core.IntLiteral = int_value 32768 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_32768.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_32768.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_32768.2: %i32 = int_value 32768 [template] // CHECK:STDOUT: %int_32768.3: %u32 = int_value 32768 [template] @@ -2383,7 +2225,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %import_ref.21 = import_ref Main//int_ops, Uint32ToUintLiteral, unloaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.22 -// CHECK:STDOUT: .ImplicitAs = %import_ref.23 +// CHECK:STDOUT: .ImplicitAs = %import_ref.29 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -2418,9 +2260,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_16) [template = constants.%i16] -// CHECK:STDOUT: %.loc9_19.1: type = value_of_initializer %int.make_type_signed [template = constants.%i16] -// CHECK:STDOUT: %.loc9_19.2: type = converted %int.make_type_signed, %.loc9_19.1 [template = constants.%i16] +// CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [template = constants.%i16] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Uint32ToInt16(%a.param_patt: %u32) -> %i16 = "int.convert_checked" [from "int_ops.carbon"]; @@ -2432,7 +2272,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Uint32ToInt16.ref: %Uint32ToInt16.type = name_ref Uint32ToInt16, imports.%import_ref.12 [template = constants.%Uint32ToInt16] // CHECK:STDOUT: %Int32ToUint32.ref: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %int_32768: Core.IntLiteral = int_value 32768 [template = constants.%int_32768.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_32768, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc9_53: init %i32 = call %Convert.specific_fn(%int_32768) [template = constants.%int_32768.2] @@ -2452,22 +2292,20 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template] -// CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] -// CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %u16: type = int_type unsigned, %int_16 [template] +// CHECK:STDOUT: %u16: type = class_type @UInt, @UInt(%int_16) [template] // CHECK:STDOUT: %Uint32ToUint16.type: type = fn_type @Uint32ToUint16 [template] // CHECK:STDOUT: %Uint32ToUint16: %Uint32ToUint16.type = struct_value () [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %u32: type = int_type unsigned, %int_32 [template] +// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(%int_32) [template] // CHECK:STDOUT: %Int32ToUint32.type: type = fn_type @Int32ToUint32 [template] // CHECK:STDOUT: %Int32ToUint32: %Int32ToUint32.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_65536.1: Core.IntLiteral = int_value 65536 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_65536.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_65536.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_65536.2: %i32 = int_value 65536 [template] // CHECK:STDOUT: %int_65536.3: %u32 = int_value 65536 [template] @@ -2498,7 +2336,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %import_ref.21 = import_ref Main//int_ops, Uint32ToUintLiteral, unloaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .UInt = %import_ref.22 -// CHECK:STDOUT: .ImplicitAs = %import_ref.23 +// CHECK:STDOUT: .ImplicitAs = %import_ref.29 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -2533,9 +2371,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_16) [template = constants.%u16] -// CHECK:STDOUT: %.loc9_19.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u16] -// CHECK:STDOUT: %.loc9_19.2: type = converted %int.make_type_unsigned, %.loc9_19.1 [template = constants.%u16] +// CHECK:STDOUT: %u16: type = class_type @UInt, @UInt(constants.%int_16) [template = constants.%u16] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Uint32ToUint16(%a.param_patt: %u32) -> %u16 = "int.convert_checked" [from "int_ops.carbon"]; @@ -2547,7 +2383,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Uint32ToUint16.ref: %Uint32ToUint16.type = name_ref Uint32ToUint16, imports.%import_ref.13 [template = constants.%Uint32ToUint16] // CHECK:STDOUT: %Int32ToUint32.ref: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %int_65536: Core.IntLiteral = int_value 65536 [template = constants.%int_65536.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_65536, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc9_54: init %i32 = call %Convert.specific_fn(%int_65536) [template = constants.%int_65536.2] @@ -2567,25 +2403,23 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template] -// CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] -// CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %u16: type = int_type unsigned, %int_16 [template] +// CHECK:STDOUT: %u16: type = class_type @UInt, @UInt(%int_16) [template] // CHECK:STDOUT: %Int32ToUint16.type: type = fn_type @Int32ToUint16 [template] // CHECK:STDOUT: %Int32ToUint16: %Int32ToUint16.type = struct_value () [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %SubI32.type: type = fn_type @SubI32 [template] // CHECK:STDOUT: %SubI32: %SubI32.type = struct_value () [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_-1.1: %i32 = int_value -1 [template] @@ -2616,7 +2450,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %import_ref.21 = import_ref Main//int_ops, Uint32ToUintLiteral, unloaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .UInt = %import_ref.22 -// CHECK:STDOUT: .ImplicitAs = %import_ref.23 +// CHECK:STDOUT: .ImplicitAs = %import_ref.29 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -2651,9 +2485,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_16) [template = constants.%u16] -// CHECK:STDOUT: %.loc9_23.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u16] -// CHECK:STDOUT: %.loc9_23.2: type = converted %int.make_type_unsigned, %.loc9_23.1 [template = constants.%u16] +// CHECK:STDOUT: %u16: type = class_type @UInt, @UInt(constants.%int_16) [template = constants.%u16] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToUint16(%a.param_patt: %i32) -> %u16 = "int.convert_checked" [from "int_ops.carbon"]; @@ -2666,13 +2498,13 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %SubI32.ref: %SubI32.type = name_ref SubI32, imports.%import_ref.2 [template = constants.%SubI32] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc9_50: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_50: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_50: = bound_method %int_0, %impl.elem0.loc9_50 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc9_50: = specific_function %Convert.bound.loc9_50, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc9_50: init %i32 = call %Convert.specific_fn.loc9_50(%int_0) [template = constants.%int_0.2] // CHECK:STDOUT: %.loc9_50.1: %i32 = value_of_initializer %int.convert_checked.loc9_50 [template = constants.%int_0.2] // CHECK:STDOUT: %.loc9_50.2: %i32 = converted %int_0, %.loc9_50.1 [template = constants.%int_0.2] -// CHECK:STDOUT: %impl.elem0.loc9_53: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_53: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_53: = bound_method %int_1, %impl.elem0.loc9_53 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc9_53: = specific_function %Convert.bound.loc9_53, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc9_53: init %i32 = call %Convert.specific_fn.loc9_53(%int_1) [template = constants.%int_1.2] @@ -2692,24 +2524,22 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] -// CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %u32: type = int_type unsigned, %int_32 [template] +// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(%int_32) [template] // CHECK:STDOUT: %Int32ToUint32.type: type = fn_type @Int32ToUint32 [template] // CHECK:STDOUT: %Int32ToUint32: %Int32ToUint32.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %SubI32.type: type = fn_type @SubI32 [template] // CHECK:STDOUT: %SubI32: %SubI32.type = struct_value () [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_-1.1: %i32 = int_value -1 [template] @@ -2740,7 +2570,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %import_ref.21 = import_ref Main//int_ops, Uint32ToUintLiteral, unloaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .UInt = %import_ref.22 -// CHECK:STDOUT: .ImplicitAs = %import_ref.23 +// CHECK:STDOUT: .ImplicitAs = %import_ref.29 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -2775,9 +2605,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_32) [template = constants.%u32] -// CHECK:STDOUT: %.loc9_23.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u32] -// CHECK:STDOUT: %.loc9_23.2: type = converted %int.make_type_unsigned, %.loc9_23.1 [template = constants.%u32] +// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToUint32(%a.param_patt: %i32) -> %u32 = "int.convert_checked" [from "int_ops.carbon"]; @@ -2790,13 +2618,13 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %SubI32.ref: %SubI32.type = name_ref SubI32, imports.%import_ref.2 [template = constants.%SubI32] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc9_50: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_50: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_50: = bound_method %int_0, %impl.elem0.loc9_50 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc9_50: = specific_function %Convert.bound.loc9_50, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc9_50: init %i32 = call %Convert.specific_fn.loc9_50(%int_0) [template = constants.%int_0.2] // CHECK:STDOUT: %.loc9_50.1: %i32 = value_of_initializer %int.convert_checked.loc9_50 [template = constants.%int_0.2] // CHECK:STDOUT: %.loc9_50.2: %i32 = converted %int_0, %.loc9_50.1 [template = constants.%int_0.2] -// CHECK:STDOUT: %impl.elem0.loc9_53: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_53: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_53: = bound_method %int_1, %impl.elem0.loc9_53 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc9_53: = specific_function %Convert.bound.loc9_53, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc9_53: init %i32 = call %Convert.specific_fn.loc9_53(%int_1) [template = constants.%int_1.2] @@ -2816,25 +2644,23 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] -// CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %u64: type = int_type unsigned, %int_64 [template] +// CHECK:STDOUT: %u64: type = class_type @UInt, @UInt(%int_64) [template] // CHECK:STDOUT: %Int32ToUint64.type: type = fn_type @Int32ToUint64 [template] // CHECK:STDOUT: %Int32ToUint64: %Int32ToUint64.type = struct_value () [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %SubI32.type: type = fn_type @SubI32 [template] // CHECK:STDOUT: %SubI32: %SubI32.type = struct_value () [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_-1.1: %i32 = int_value -1 [template] @@ -2865,7 +2691,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %import_ref.21 = import_ref Main//int_ops, Uint32ToUintLiteral, unloaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .UInt = %import_ref.22 -// CHECK:STDOUT: .ImplicitAs = %import_ref.23 +// CHECK:STDOUT: .ImplicitAs = %import_ref.29 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -2900,9 +2726,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call constants.%UInt(%int_64) [template = constants.%u64] -// CHECK:STDOUT: %.loc9_23.1: type = value_of_initializer %int.make_type_unsigned [template = constants.%u64] -// CHECK:STDOUT: %.loc9_23.2: type = converted %int.make_type_unsigned, %.loc9_23.1 [template = constants.%u64] +// CHECK:STDOUT: %u64: type = class_type @UInt, @UInt(constants.%int_64) [template = constants.%u64] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToUint64(%a.param_patt: %i32) -> %u64 = "int.convert_checked" [from "int_ops.carbon"]; @@ -2915,13 +2739,13 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %SubI32.ref: %SubI32.type = name_ref SubI32, imports.%import_ref.2 [template = constants.%SubI32] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc9_50: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_50: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_50: = bound_method %int_0, %impl.elem0.loc9_50 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc9_50: = specific_function %Convert.bound.loc9_50, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc9_50: init %i32 = call %Convert.specific_fn.loc9_50(%int_0) [template = constants.%int_0.2] // CHECK:STDOUT: %.loc9_50.1: %i32 = value_of_initializer %int.convert_checked.loc9_50 [template = constants.%int_0.2] // CHECK:STDOUT: %.loc9_50.2: %i32 = converted %int_0, %.loc9_50.1 [template = constants.%int_0.2] -// CHECK:STDOUT: %impl.elem0.loc9_53: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_53: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_53: = bound_method %int_1, %impl.elem0.loc9_53 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc9_53: = specific_function %Convert.bound.loc9_53, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc9_53: init %i32 = call %Convert.specific_fn.loc9_53(%int_1) [template = constants.%int_1.2] @@ -2941,21 +2765,19 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template] -// CHECK:STDOUT: %Int.type: type = fn_type @Int [template] -// CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i16: type = int_type signed, %int_16 [template] +// CHECK:STDOUT: %i16: type = class_type @Int, @Int(%int_16) [template] // CHECK:STDOUT: %Int32ToInt16.type: type = fn_type @Int32ToInt16 [template] // CHECK:STDOUT: %Int32ToInt16: %Int32ToInt16.type = struct_value () [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %NegateI32.type: type = fn_type @NegateI32 [template] // CHECK:STDOUT: %NegateI32: %NegateI32.type = struct_value () [template] // CHECK:STDOUT: %int_32769.1: Core.IntLiteral = int_value 32769 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_32769.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_32769.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_32769.2: %i32 = int_value 32769 [template] // CHECK:STDOUT: %int_-32769.1: %i32 = int_value -32769 [template] @@ -2986,7 +2808,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %import_ref.21 = import_ref Main//int_ops, Uint32ToUintLiteral, unloaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.22 -// CHECK:STDOUT: .ImplicitAs = %import_ref.23 +// CHECK:STDOUT: .ImplicitAs = %import_ref.26 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -3021,9 +2843,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_16) [template = constants.%i16] -// CHECK:STDOUT: %.loc9_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i16] -// CHECK:STDOUT: %.loc9_20.2: type = converted %int.make_type_signed, %.loc9_20.1 [template = constants.%i16] +// CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [template = constants.%i16] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToInt16(%a.param_patt: %i32) -> %i16 = "int.convert_checked" [from "int_ops.carbon"]; @@ -3035,7 +2855,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Int32ToInt16.ref: %Int32ToInt16.type = name_ref Int32ToInt16, imports.%import_ref.10 [template = constants.%Int32ToInt16] // CHECK:STDOUT: %NegateI32.ref: %NegateI32.type = name_ref NegateI32, imports.%import_ref.1 [template = constants.%NegateI32] // CHECK:STDOUT: %int_32769: Core.IntLiteral = int_value 32769 [template = constants.%int_32769.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_32769, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc9_49: init %i32 = call %Convert.specific_fn(%int_32769) [template = constants.%int_32769.2] @@ -3055,25 +2875,23 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template] -// CHECK:STDOUT: %i16: type = int_type signed, %int_16 [template] +// CHECK:STDOUT: %i16: type = class_type @Int, @Int(%int_16) [template] // CHECK:STDOUT: %Int32ToInt16.type: type = fn_type @Int32ToInt16 [template] // CHECK:STDOUT: %Int32ToInt16: %Int32ToInt16.type = struct_value () [template] // CHECK:STDOUT: %Int32ToInt32.type: type = fn_type @Int32ToInt32 [template] // CHECK:STDOUT: %Int32ToInt32: %Int32ToInt32.type = struct_value () [template] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %i64: type = int_type signed, %int_64 [template] +// CHECK:STDOUT: %i64: type = class_type @Int, @Int(%int_64) [template] // CHECK:STDOUT: %Int32ToInt64.type: type = fn_type @Int32ToInt64 [template] // CHECK:STDOUT: %Int32ToInt64: %Int32ToInt64.type = struct_value () [template] // CHECK:STDOUT: } @@ -3102,7 +2920,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %import_ref.21 = import_ref Main//int_ops, Uint32ToUintLiteral, unloaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.22 -// CHECK:STDOUT: .ImplicitAs = %import_ref.23 +// CHECK:STDOUT: .ImplicitAs = %import_ref.26 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -3140,21 +2958,13 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // 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_19.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_signed.loc5, %.loc5_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%int_16) [template = constants.%i16] -// CHECK:STDOUT: %.loc15_34.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i16] -// CHECK:STDOUT: %.loc15_34.2: type = converted %int.make_type_signed.loc15, %.loc15_34.1 [template = constants.%i16] +// CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [template = constants.%i16] // CHECK:STDOUT: %int_32.loc25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc25: init type = call constants.%Int(%int_32.loc25) [template = constants.%i32] -// CHECK:STDOUT: %.loc25_32.1: type = value_of_initializer %int.make_type_signed.loc25 [template = constants.%i32] -// CHECK:STDOUT: %.loc25_32.2: type = converted %int.make_type_signed.loc25, %.loc25_32.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %int.make_type_signed.loc34: init type = call constants.%Int(%int_64) [template = constants.%i64] -// CHECK:STDOUT: %.loc34_33.1: type = value_of_initializer %int.make_type_signed.loc34 [template = constants.%i64] -// CHECK:STDOUT: %.loc34_33.2: type = converted %int.make_type_signed.loc34, %.loc34_33.1 [template = constants.%i64] +// CHECK:STDOUT: %i64: type = class_type @Int, @Int(constants.%int_64) [template = constants.%i64] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToInt16(%a.param_patt: %i32) -> %i16 = "int.convert_checked" [from "int_ops.carbon"]; @@ -3166,7 +2976,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // 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: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc5: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/builtins/int/eq.carbon b/toolchain/check/testdata/builtins/int/eq.carbon index 1859c8b8718f..d8a3614bad6e 100644 --- a/toolchain/check/testdata/builtins/int/eq.carbon +++ b/toolchain/check/testdata/builtins/int/eq.carbon @@ -37,30 +37,28 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] -// CHECK:STDOUT: %Eq.type: type = fn_type @Eq [template] -// CHECK:STDOUT: %Eq: %Eq.type = struct_value () [template] +// CHECK:STDOUT: %Eq.type.1: type = fn_type @Eq.1 [template] +// CHECK:STDOUT: %Eq: %Eq.type.1 = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %true: bool = bool_literal true [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %false: bool = bool_literal false [template] @@ -71,8 +69,8 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .Bool = %import_ref.2 -// CHECK:STDOUT: .ImplicitAs = %import_ref.3 +// CHECK:STDOUT: .Bool = %import_ref.5 +// CHECK:STDOUT: .ImplicitAs = %import_ref.6 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -88,7 +86,7 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Eq.decl: %Eq.type = fn_decl @Eq [template = constants.%Eq] { +// CHECK:STDOUT: %Eq.decl: %Eq.type.1 = fn_decl @Eq.1 [template = constants.%Eq] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -97,13 +95,9 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc2_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_10: init type = call constants.%Int(%int_32.loc2_10) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_10.1: type = value_of_initializer %int.make_type_signed.loc2_10 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_10.2: type = converted %int.make_type_signed.loc2_10, %.loc2_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_18: init type = call constants.%Int(%int_32.loc2_18) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_18.1: type = value_of_initializer %int.make_type_signed.loc2_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_18.2: type = converted %int.make_type_signed.loc2_18, %.loc2_18.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_26.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_26.2: type = converted %bool.make_type, %.loc2_26.1 [template = bool] @@ -138,13 +132,9 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc12_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc12_19: init type = call constants.%Int(%int_32.loc12_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_19.1: type = value_of_initializer %int.make_type_signed.loc12_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_19.2: type = converted %int.make_type_signed.loc12_19, %.loc12_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc12_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc12_27: init type = call constants.%Int(%int_32.loc12_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_27.1: type = value_of_initializer %int.make_type_signed.loc12_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_27.2: type = converted %int.make_type_signed.loc12_27, %.loc12_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc12_35.2: type = converted %bool.make_type, %.loc12_35.1 [template = bool] @@ -158,7 +148,7 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True @@ -166,28 +156,28 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Eq(%a.param_patt: %i32, %b.param_patt: %i32) -> bool = "int.eq"; +// CHECK:STDOUT: fn @Eq.1(%a.param_patt: %i32, %b.param_patt: %i32) -> bool = "int.eq"; // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%true_.param_patt: %True, %false_.param_patt: %False) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %true_.ref: %True = name_ref true_, %true_ -// CHECK:STDOUT: %Eq.ref.loc8: %Eq.type = name_ref Eq, file.%Eq.decl [template = constants.%Eq] +// CHECK:STDOUT: %Eq.ref.loc8: %Eq.type.1 = name_ref Eq, file.%Eq.decl [template = constants.%Eq] // CHECK:STDOUT: %int_1.loc8_19: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_1.loc8_22: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc8_19: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc8_19: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc8_19: = bound_method %int_1.loc8_19, %impl.elem0.loc8_19 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc8_19: = specific_function %Convert.bound.loc8_19, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc8_19: init %i32 = call %Convert.specific_fn.loc8_19(%int_1.loc8_19) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc8_19.1: %i32 = value_of_initializer %int.convert_checked.loc8_19 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc8_19.2: %i32 = converted %int_1.loc8_19, %.loc8_19.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc8_22: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc8_22: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc8_22: = bound_method %int_1.loc8_22, %impl.elem0.loc8_22 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc8_22: = specific_function %Convert.bound.loc8_22, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc8_22: init %i32 = call %Convert.specific_fn.loc8_22(%int_1.loc8_22) [template = constants.%int_1.2] @@ -209,16 +199,16 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: !if.expr.result.loc8: // CHECK:STDOUT: %.loc8_13.3: type = block_arg !if.expr.result.loc8 [template = constants.%True] // CHECK:STDOUT: %false_.ref: %False = name_ref false_, %false_ -// CHECK:STDOUT: %Eq.ref.loc9: %Eq.type = name_ref Eq, file.%Eq.decl [template = constants.%Eq] +// CHECK:STDOUT: %Eq.ref.loc9: %Eq.type.1 = name_ref Eq, file.%Eq.decl [template = constants.%Eq] // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc9_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_20: = bound_method %int_1.loc9, %impl.elem0.loc9_20 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc9_20: = specific_function %Convert.bound.loc9_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc9_20: init %i32 = call %Convert.specific_fn.loc9_20(%int_1.loc9) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc9_20.1: %i32 = value_of_initializer %int.convert_checked.loc9_20 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc9_20.2: %i32 = converted %int_1.loc9, %.loc9_20.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc9_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_23: = bound_method %int_2, %impl.elem0.loc9_23 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc9_23: = specific_function %Convert.bound.loc9_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc9_23: init %i32 = call %Convert.specific_fn.loc9_23(%int_2) [template = constants.%int_2.2] @@ -244,7 +234,7 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a.param_patt: %i32, %b.param_patt: %i32) -> bool { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Eq.ref: %Eq.type = name_ref Eq, file.%Eq.decl [template = constants.%Eq] +// CHECK:STDOUT: %Eq.ref: %Eq.type.1 = name_ref Eq, file.%Eq.decl [template = constants.%Eq] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.eq: init bool = call %Eq.ref(%a.ref, %b.ref) @@ -257,16 +247,14 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %WrongResult.type: type = fn_type @WrongResult [template] // CHECK:STDOUT: %WrongResult: %WrongResult.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -287,17 +275,11 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 diff --git a/toolchain/check/testdata/builtins/int/greater.carbon b/toolchain/check/testdata/builtins/int/greater.carbon index 1424735e65d2..430c602d3043 100644 --- a/toolchain/check/testdata/builtins/int/greater.carbon +++ b/toolchain/check/testdata/builtins/int/greater.carbon @@ -32,36 +32,34 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Greater.type: type = fn_type @Greater [template] // CHECK:STDOUT: %Greater: %Greater.type = struct_value () [template] -// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] +// CHECK:STDOUT: %Negate.type.1: type = fn_type @Negate.1 [template] +// CHECK:STDOUT: %Negate: %Negate.type.1 = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [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: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %false: bool = bool_literal false [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %true: bool = bool_literal true [template] @@ -73,8 +71,8 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .Bool = %import_ref.2 -// CHECK:STDOUT: .ImplicitAs = %import_ref.3 +// CHECK:STDOUT: .Bool = %import_ref.5 +// CHECK:STDOUT: .ImplicitAs = %import_ref.6 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -100,13 +98,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc2_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_15: init type = call constants.%Int(%int_32.loc2_15) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_15.1: type = value_of_initializer %int.make_type_signed.loc2_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_15.2: type = converted %int.make_type_signed.loc2_15, %.loc2_15.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_23: init type = call constants.%Int(%int_32.loc2_23) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_23.1: type = value_of_initializer %int.make_type_signed.loc2_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_23.2: type = converted %int.make_type_signed.loc2_23, %.loc2_23.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_31.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_31.2: type = converted %bool.make_type, %.loc2_31.1 [template = bool] @@ -117,20 +111,16 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %Negate.decl: %Negate.type.1 = fn_decl @Negate.1 [template = constants.%Negate] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc3_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc3_14: init type = call constants.%Int(%int_32.loc3_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %int.make_type_signed.loc3_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc3_14.2: type = converted %int.make_type_signed.loc3_14, %.loc3_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc3_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc3_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc3_22: init type = call constants.%Int(%int_32.loc3_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc3_22.1: type = value_of_initializer %int.make_type_signed.loc3_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc3_22.2: type = converted %int.make_type_signed.loc3_22, %.loc3_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc3_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -160,13 +150,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc16_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc16_19: init type = call constants.%Int(%int_32.loc16_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %int.make_type_signed.loc16_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_19.2: type = converted %int.make_type_signed.loc16_19, %.loc16_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc16_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc16_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc16_27: init type = call constants.%Int(%int_32.loc16_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_27.1: type = value_of_initializer %int.make_type_signed.loc16_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_27.2: type = converted %int.make_type_signed.loc16_27, %.loc16_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc16_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type, %.loc16_35.1 [template = bool] @@ -180,7 +166,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True @@ -188,7 +174,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False @@ -197,7 +183,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @Greater(%a.param_patt: %i32, %b.param_patt: %i32) -> bool = "int.greater"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Negate(%a.param_patt: %i32) -> %i32 = "int.snegate"; +// CHECK:STDOUT: fn @Negate.1(%a.param_patt: %i32) -> %i32 = "int.snegate"; // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%true_.param_patt: %True, %false_.param_patt: %False) { // CHECK:STDOUT: !entry: @@ -205,13 +191,13 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %Greater.ref.loc9: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc9_25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_25: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_25: = bound_method %int_1.loc9, %impl.elem0.loc9_25 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc9_25: = specific_function %Convert.bound.loc9_25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc9_25: init %i32 = call %Convert.specific_fn.loc9_25(%int_1.loc9) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc9_25.1: %i32 = value_of_initializer %int.convert_checked.loc9_25 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc9_25.2: %i32 = converted %int_1.loc9, %.loc9_25.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc9_28: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_28: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_28: = bound_method %int_2, %impl.elem0.loc9_28 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc9_28: = specific_function %Convert.bound.loc9_28, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc9_28: init %i32 = call %Convert.specific_fn.loc9_28(%int_2) [template = constants.%int_2.2] @@ -236,13 +222,13 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %Greater.ref.loc10: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] // CHECK:STDOUT: %int_1.loc10_25: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_1.loc10_28: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc10_25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc10_25: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc10_25: = bound_method %int_1.loc10_25, %impl.elem0.loc10_25 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc10_25: = specific_function %Convert.bound.loc10_25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc10_25: init %i32 = call %Convert.specific_fn.loc10_25(%int_1.loc10_25) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc10_25.1: %i32 = value_of_initializer %int.convert_checked.loc10_25 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc10_25.2: %i32 = converted %int_1.loc10_25, %.loc10_25.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc10_28: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc10_28: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc10_28: = bound_method %int_1.loc10_28, %impl.elem0.loc10_28 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc10_28: = specific_function %Convert.bound.loc10_28, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc10_28: init %i32 = call %Convert.specific_fn.loc10_28(%int_1.loc10_28) [template = constants.%int_1.2] @@ -267,13 +253,13 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %Greater.ref.loc11: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_0.loc11: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc11_24: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_24: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_24: = bound_method %int_1.loc11, %impl.elem0.loc11_24 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_24: = specific_function %Convert.bound.loc11_24, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_24: init %i32 = call %Convert.specific_fn.loc11_24(%int_1.loc11) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc11_24.1: %i32 = value_of_initializer %int.convert_checked.loc11_24 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc11_24.2: %i32 = converted %int_1.loc11, %.loc11_24.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc11_27: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_27: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_27: = bound_method %int_0.loc11, %impl.elem0.loc11_27 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc11_27: = specific_function %Convert.bound.loc11_27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc11_27: init %i32 = call %Convert.specific_fn.loc11_27(%int_0.loc11) [template = constants.%int_0.2] @@ -296,9 +282,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc11_13.3: type = block_arg !if.expr.result.loc11 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc12: %False = name_ref false_, %false_ // CHECK:STDOUT: %Greater.ref.loc12: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] -// CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc12: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc12_32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_32: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_32: = bound_method %int_1.loc12, %impl.elem0.loc12_32 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc12_32: = specific_function %Convert.bound.loc12_32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc12_32: init %i32 = call %Convert.specific_fn.loc12_32(%int_1.loc12) [template = constants.%int_1.2] @@ -308,7 +294,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %int_0.loc12: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc12_33.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%int_-1] // CHECK:STDOUT: %.loc12_33.2: %i32 = converted %int.snegate.loc12, %.loc12_33.1 [template = constants.%int_-1] -// CHECK:STDOUT: %impl.elem0.loc12_36: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_36: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_36: = bound_method %int_0.loc12, %impl.elem0.loc12_36 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc12_36: = specific_function %Convert.bound.loc12_36, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc12_36: init %i32 = call %Convert.specific_fn.loc12_36(%int_0.loc12) [template = constants.%int_0.2] @@ -332,16 +318,16 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %true_.ref.loc13: %True = name_ref true_, %true_ // CHECK:STDOUT: %Greater.ref.loc13: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] // CHECK:STDOUT: %int_0.loc13: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %Negate.ref.loc13: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc13: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc13_34: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13_34: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13_34: = bound_method %int_1.loc13, %impl.elem0.loc13_34 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc13_34: = specific_function %Convert.bound.loc13_34, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc13_34: init %i32 = call %Convert.specific_fn.loc13_34(%int_1.loc13) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc13_34.1: %i32 = value_of_initializer %int.convert_checked.loc13_34 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc13_34.2: %i32 = converted %int_1.loc13, %.loc13_34.1 [template = constants.%int_1.2] // CHECK:STDOUT: %int.snegate.loc13: init %i32 = call %Negate.ref.loc13(%.loc13_34.2) [template = constants.%int_-1] -// CHECK:STDOUT: %impl.elem0.loc13_24: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13_24: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13_24: = bound_method %int_0.loc13, %impl.elem0.loc13_24 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc13_24: = specific_function %Convert.bound.loc13_24, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc13_24: init %i32 = call %Convert.specific_fn.loc13_24(%int_0.loc13) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/builtins/int/greater_eq.carbon b/toolchain/check/testdata/builtins/int/greater_eq.carbon index 834e7811de0a..b1c2f176a697 100644 --- a/toolchain/check/testdata/builtins/int/greater_eq.carbon +++ b/toolchain/check/testdata/builtins/int/greater_eq.carbon @@ -32,37 +32,35 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %GreaterEq.type: type = fn_type @GreaterEq [template] // CHECK:STDOUT: %GreaterEq: %GreaterEq.type = struct_value () [template] -// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] +// CHECK:STDOUT: %Negate.type.1: type = fn_type @Negate.1 [template] +// CHECK:STDOUT: %Negate: %Negate.type.1 = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [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: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %false: bool = bool_literal false [template] // CHECK:STDOUT: %true: bool = bool_literal true [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %int_-1: %i32 = int_value -1 [template] @@ -73,8 +71,8 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .Bool = %import_ref.2 -// CHECK:STDOUT: .ImplicitAs = %import_ref.3 +// CHECK:STDOUT: .Bool = %import_ref.5 +// CHECK:STDOUT: .ImplicitAs = %import_ref.6 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -100,13 +98,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc2_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_17: init type = call constants.%Int(%int_32.loc2_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_17.1: type = value_of_initializer %int.make_type_signed.loc2_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_17.2: type = converted %int.make_type_signed.loc2_17, %.loc2_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_25: init type = call constants.%Int(%int_32.loc2_25) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_25.1: type = value_of_initializer %int.make_type_signed.loc2_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_25.2: type = converted %int.make_type_signed.loc2_25, %.loc2_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_33.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_33.2: type = converted %bool.make_type, %.loc2_33.1 [template = bool] @@ -117,20 +111,16 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %Negate.decl: %Negate.type.1 = fn_decl @Negate.1 [template = constants.%Negate] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc3_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc3_14: init type = call constants.%Int(%int_32.loc3_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %int.make_type_signed.loc3_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc3_14.2: type = converted %int.make_type_signed.loc3_14, %.loc3_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc3_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc3_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc3_22: init type = call constants.%Int(%int_32.loc3_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc3_22.1: type = value_of_initializer %int.make_type_signed.loc3_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc3_22.2: type = converted %int.make_type_signed.loc3_22, %.loc3_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc3_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -160,13 +150,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc16_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc16_19: init type = call constants.%Int(%int_32.loc16_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %int.make_type_signed.loc16_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_19.2: type = converted %int.make_type_signed.loc16_19, %.loc16_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc16_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc16_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc16_27: init type = call constants.%Int(%int_32.loc16_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_27.1: type = value_of_initializer %int.make_type_signed.loc16_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_27.2: type = converted %int.make_type_signed.loc16_27, %.loc16_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc16_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type, %.loc16_35.1 [template = bool] @@ -180,7 +166,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True @@ -188,7 +174,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False @@ -197,7 +183,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @GreaterEq(%a.param_patt: %i32, %b.param_patt: %i32) -> bool = "int.greater_eq"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Negate(%a.param_patt: %i32) -> %i32 = "int.snegate"; +// CHECK:STDOUT: fn @Negate.1(%a.param_patt: %i32) -> %i32 = "int.snegate"; // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%true_.param_patt: %True, %false_.param_patt: %False) { // CHECK:STDOUT: !entry: @@ -205,13 +191,13 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %GreaterEq.ref.loc9: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc9_27: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_27: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_27: = bound_method %int_1.loc9, %impl.elem0.loc9_27 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc9_27: = specific_function %Convert.bound.loc9_27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc9_27: init %i32 = call %Convert.specific_fn.loc9_27(%int_1.loc9) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc9_27.1: %i32 = value_of_initializer %int.convert_checked.loc9_27 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc9_27.2: %i32 = converted %int_1.loc9, %.loc9_27.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc9_30: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_30: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_30: = bound_method %int_2, %impl.elem0.loc9_30 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc9_30: = specific_function %Convert.bound.loc9_30, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc9_30: init %i32 = call %Convert.specific_fn.loc9_30(%int_2) [template = constants.%int_2.2] @@ -236,13 +222,13 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %GreaterEq.ref.loc10: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] // CHECK:STDOUT: %int_1.loc10_26: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_1.loc10_29: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc10_26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc10_26: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc10_26: = bound_method %int_1.loc10_26, %impl.elem0.loc10_26 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc10_26: = specific_function %Convert.bound.loc10_26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc10_26: init %i32 = call %Convert.specific_fn.loc10_26(%int_1.loc10_26) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc10_26.1: %i32 = value_of_initializer %int.convert_checked.loc10_26 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc10_26.2: %i32 = converted %int_1.loc10_26, %.loc10_26.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc10_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc10_29: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc10_29: = bound_method %int_1.loc10_29, %impl.elem0.loc10_29 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc10_29: = specific_function %Convert.bound.loc10_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc10_29: init %i32 = call %Convert.specific_fn.loc10_29(%int_1.loc10_29) [template = constants.%int_1.2] @@ -267,13 +253,13 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %GreaterEq.ref.loc11: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_0.loc11: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc11_26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_26: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_26: = bound_method %int_1.loc11, %impl.elem0.loc11_26 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_26: = specific_function %Convert.bound.loc11_26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_26: init %i32 = call %Convert.specific_fn.loc11_26(%int_1.loc11) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc11_26.1: %i32 = value_of_initializer %int.convert_checked.loc11_26 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc11_26.2: %i32 = converted %int_1.loc11, %.loc11_26.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc11_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_29: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_29: = bound_method %int_0.loc11, %impl.elem0.loc11_29 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc11_29: = specific_function %Convert.bound.loc11_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc11_29: init %i32 = call %Convert.specific_fn.loc11_29(%int_0.loc11) [template = constants.%int_0.2] @@ -296,9 +282,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc11_13.3: type = block_arg !if.expr.result.loc11 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc12: %False = name_ref false_, %false_ // CHECK:STDOUT: %GreaterEq.ref.loc12: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] -// CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc12: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc12_34: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_34: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_34: = bound_method %int_1.loc12, %impl.elem0.loc12_34 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc12_34: = specific_function %Convert.bound.loc12_34, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc12_34: init %i32 = call %Convert.specific_fn.loc12_34(%int_1.loc12) [template = constants.%int_1.2] @@ -308,7 +294,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %int_0.loc12: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc12_35.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%int_-1] // CHECK:STDOUT: %.loc12_35.2: %i32 = converted %int.snegate.loc12, %.loc12_35.1 [template = constants.%int_-1] -// CHECK:STDOUT: %impl.elem0.loc12_38: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_38: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_38: = bound_method %int_0.loc12, %impl.elem0.loc12_38 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc12_38: = specific_function %Convert.bound.loc12_38, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc12_38: init %i32 = call %Convert.specific_fn.loc12_38(%int_0.loc12) [template = constants.%int_0.2] @@ -332,16 +318,16 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %true_.ref.loc13: %True = name_ref true_, %true_ // CHECK:STDOUT: %GreaterEq.ref.loc13: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] // CHECK:STDOUT: %int_0.loc13: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %Negate.ref.loc13: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc13: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc13_36: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13_36: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13_36: = bound_method %int_1.loc13, %impl.elem0.loc13_36 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc13_36: = specific_function %Convert.bound.loc13_36, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc13_36: init %i32 = call %Convert.specific_fn.loc13_36(%int_1.loc13) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc13_36.1: %i32 = value_of_initializer %int.convert_checked.loc13_36 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc13_36.2: %i32 = converted %int_1.loc13, %.loc13_36.1 [template = constants.%int_1.2] // CHECK:STDOUT: %int.snegate.loc13: init %i32 = call %Negate.ref.loc13(%.loc13_36.2) [template = constants.%int_-1] -// CHECK:STDOUT: %impl.elem0.loc13_26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13_26: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13_26: = bound_method %int_0.loc13, %impl.elem0.loc13_26 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc13_26: = specific_function %Convert.bound.loc13_26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc13_26: init %i32 = call %Convert.specific_fn.loc13_26(%int_0.loc13) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/builtins/int/left_shift.carbon b/toolchain/check/testdata/builtins/int/left_shift.carbon index a9add0883ef1..a76d6a00e7bb 100644 --- a/toolchain/check/testdata/builtins/int/left_shift.carbon +++ b/toolchain/check/testdata/builtins/int/left_shift.carbon @@ -67,30 +67,28 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %LeftShift.type: type = fn_type @LeftShift [template] -// CHECK:STDOUT: %LeftShift: %LeftShift.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %LeftShift.type.1: type = fn_type @LeftShift.1 [template] +// CHECK:STDOUT: %LeftShift: %LeftShift.type.1 = struct_value () [template] // CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_5.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %int_20.1: %i32 = int_value 20 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_20.1, %Convert.15 [template] -// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_20.1, %Convert.11 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.3(%int_32) [template] // CHECK:STDOUT: %int_20.2: Core.IntLiteral = int_value 20 [template] // CHECK:STDOUT: %array_type: type = array_type %int_20.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -101,7 +99,7 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -116,7 +114,7 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %LeftShift.decl: %LeftShift.type = fn_decl @LeftShift [template = constants.%LeftShift] { +// CHECK:STDOUT: %LeftShift.decl: %LeftShift.type.1 = fn_decl @LeftShift.1 [template = constants.%LeftShift] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -125,17 +123,11 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc2_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_17: init type = call constants.%Int(%int_32.loc2_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_17.1: type = value_of_initializer %int.make_type_signed.loc2_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_17.2: type = converted %int.make_type_signed.loc2_17, %.loc2_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_25: init type = call constants.%Int(%int_32.loc2_25) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_25.1: type = value_of_initializer %int.make_type_signed.loc2_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_25.2: type = converted %int.make_type_signed.loc2_25, %.loc2_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_33: init type = call constants.%Int(%int_32.loc2_33) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_33.1: type = value_of_initializer %int.make_type_signed.loc2_33 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_33.2: type = converted %int.make_type_signed.loc2_33, %.loc2_33.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -144,28 +136,26 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // 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: %LeftShift.ref: %LeftShift.type = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] +// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %LeftShift.ref: %LeftShift.type.1 = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc4_26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_26: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_26: = bound_method %int_5, %impl.elem0.loc4_26 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc4_26: = specific_function %Convert.bound.loc4_26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc4_26: init %i32 = call %Convert.specific_fn.loc4_26(%int_5) [template = constants.%int_5.2] // CHECK:STDOUT: %.loc4_26.1: %i32 = value_of_initializer %int.convert_checked.loc4_26 [template = constants.%int_5.2] // CHECK:STDOUT: %.loc4_26.2: %i32 = converted %int_5, %.loc4_26.1 [template = constants.%int_5.2] -// CHECK:STDOUT: %impl.elem0.loc4_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_29: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_29: = bound_method %int_2, %impl.elem0.loc4_29 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc4_29: = specific_function %Convert.bound.loc4_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc4_29: init %i32 = call %Convert.specific_fn.loc4_29(%int_2) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc4_29.1: %i32 = value_of_initializer %int.convert_checked.loc4_29 [template = constants.%int_2.2] // CHECK:STDOUT: %.loc4_29.2: %i32 = converted %int_2, %.loc4_29.1 [template = constants.%int_2.2] // CHECK:STDOUT: %int.left_shift: init %i32 = call %LeftShift.ref(%.loc4_26.2, %.loc4_29.2) [template = constants.%int_20.1] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc4_30: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %impl.elem0.loc4_30: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc4_30: = bound_method %int.left_shift, %impl.elem0.loc4_30 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_30: = specific_function %Convert.bound.loc4_30, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_30: = specific_function %Convert.bound.loc4_30, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %.loc4_30.1: %i32 = value_of_initializer %int.left_shift [template = constants.%int_20.1] // CHECK:STDOUT: %.loc4_30.2: %i32 = converted %int.left_shift, %.loc4_30.1 [template = constants.%int_20.1] // CHECK:STDOUT: %int.convert_checked.loc4_30: init Core.IntLiteral = call %Convert.specific_fn.loc4_30(%.loc4_30.2) [template = constants.%int_20.2] @@ -175,10 +165,8 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var // 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: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_20: Core.IntLiteral = int_value 20 [template = constants.%int_20.2] -// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc5: type = array_type %int_20, %i32 [template = constants.%array_type] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -190,17 +178,11 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -210,11 +192,11 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @LeftShift(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.left_shift"; +// CHECK:STDOUT: fn @LeftShift.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.left_shift"; // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %LeftShift.ref: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] +// CHECK:STDOUT: %LeftShift.ref: %LeftShift.type.1 = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.left_shift: init %i32 = call %LeftShift.ref(%a.ref, %b.ref) @@ -235,40 +217,38 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32.1: 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, %int_32.1 [template] -// CHECK:STDOUT: %LeftShift.type: type = fn_type @LeftShift [template] -// CHECK:STDOUT: %LeftShift: %LeftShift.type = struct_value () [template] -// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32.1) [template] +// CHECK:STDOUT: %LeftShift.type.1: type = fn_type @LeftShift.1 [template] +// CHECK:STDOUT: %LeftShift: %LeftShift.type.1 = struct_value () [template] +// CHECK:STDOUT: %Negate.type.1: type = fn_type @Negate.1 [template] +// CHECK:STDOUT: %Negate: %Negate.type.1 = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %int_31.1: Core.IntLiteral = int_value 31 [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(%int_32.1) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32.1) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32.1) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_31.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_31.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32.1) [template] // CHECK:STDOUT: %int_31.2: %i32 = int_value 31 [template] // CHECK:STDOUT: %int_-2147483648: %i32 = int_value -2147483648 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_32.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_32.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32.1) [template] // CHECK:STDOUT: %int_32.2: %i32 = int_value 32 [template] // CHECK:STDOUT: %int_33.1: Core.IntLiteral = int_value 33 [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_33.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_33.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32.1) [template] // CHECK:STDOUT: %int_33.2: %i32 = int_value 33 [template] // CHECK:STDOUT: %int_1000.1: Core.IntLiteral = int_value 1000 [template] -// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_1000.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_1000.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.5: = specific_function %Convert.bound.5, @Convert.2(%int_32.1) [template] // CHECK:STDOUT: %int_1000.2: %i32 = int_value 1000 [template] // CHECK:STDOUT: %int_0.1: %i32 = int_value 0 [template] // CHECK:STDOUT: %int_0.2: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %Convert.bound.6: = bound_method %int_0.2, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.6: = bound_method %int_0.2, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.6: = specific_function %Convert.bound.6, @Convert.2(%int_32.1) [template] // CHECK:STDOUT: %int_-1: %i32 = int_value -1 [template] // CHECK:STDOUT: } @@ -276,7 +256,7 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -297,7 +277,7 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: .negative = @__global_init.%negative // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %LeftShift.decl: %LeftShift.type = fn_decl @LeftShift [template = constants.%LeftShift] { +// CHECK:STDOUT: %LeftShift.decl: %LeftShift.type.1 = fn_decl @LeftShift.1 [template = constants.%LeftShift] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -306,17 +286,11 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc4_17: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_17: init type = call constants.%Int(%int_32.loc4_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_17.1: type = value_of_initializer %int.make_type_signed.loc4_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_17.2: type = converted %int.make_type_signed.loc4_17, %.loc4_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_17: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_25: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_25: init type = call constants.%Int(%int_32.loc4_25) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_25.1: type = value_of_initializer %int.make_type_signed.loc4_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_25.2: type = converted %int.make_type_signed.loc4_25, %.loc4_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_25: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_33: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_33: init type = call constants.%Int(%int_32.loc4_33) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_33.1: type = value_of_initializer %int.make_type_signed.loc4_33 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_33.2: type = converted %int.make_type_signed.loc4_33, %.loc4_33.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_33: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -324,75 +298,55 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %Negate.decl: %Negate.type.1 = fn_decl @Negate.1 [template = constants.%Negate] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc5_14: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_14: init type = call constants.%Int(%int_32.loc5_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_14.1: type = value_of_initializer %int.make_type_signed.loc5_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_14.2: type = converted %int.make_type_signed.loc5_14, %.loc5_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_14: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_22: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_22: init type = call constants.%Int(%int_32.loc5_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_22.1: type = value_of_initializer %int.make_type_signed.loc5_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_22.2: type = converted %int.make_type_signed.loc5_22, %.loc5_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_22: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_32.loc8) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_13.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_13.2: type = converted %int.make_type_signed.loc8, %.loc8_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc8: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// 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: %i32.loc13: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc18: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %int.make_type_signed.loc18: init type = call constants.%Int(%int_32.loc18) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_13.1: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_13.2: type = converted %int.make_type_signed.loc18, %.loc18_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc18: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_17.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_17.2: type = converted %int.make_type_signed.loc21, %.loc21_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc26: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %int.make_type_signed.loc26: init type = call constants.%Int(%int_32.loc26) [template = constants.%i32] -// CHECK:STDOUT: %.loc26_17.1: type = value_of_initializer %int.make_type_signed.loc26 [template = constants.%i32] -// CHECK:STDOUT: %.loc26_17.2: type = converted %int.make_type_signed.loc26, %.loc26_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc26: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc29: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %int.make_type_signed.loc29: init type = call constants.%Int(%int_32.loc29) [template = constants.%i32] -// CHECK:STDOUT: %.loc29_20.1: type = value_of_initializer %int.make_type_signed.loc29 [template = constants.%i32] -// CHECK:STDOUT: %.loc29_20.2: type = converted %int.make_type_signed.loc29, %.loc29_20.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc29: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc34: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %int.make_type_signed.loc34: init type = call constants.%Int(%int_32.loc34) [template = constants.%i32] -// CHECK:STDOUT: %.loc34_20.1: type = value_of_initializer %int.make_type_signed.loc34 [template = constants.%i32] -// CHECK:STDOUT: %.loc34_20.2: type = converted %int.make_type_signed.loc34, %.loc34_20.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc34: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc40: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %int.make_type_signed.loc40: init type = call constants.%Int(%int_32.loc40) [template = constants.%i32] -// CHECK:STDOUT: %.loc40_15.1: type = value_of_initializer %int.make_type_signed.loc40 [template = constants.%i32] -// CHECK:STDOUT: %.loc40_15.2: type = converted %int.make_type_signed.loc40, %.loc40_15.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc40: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @LeftShift(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.left_shift"; +// CHECK:STDOUT: fn @LeftShift.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.left_shift"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Negate(%a.param_patt: %i32) -> %i32 = "int.snegate"; +// CHECK:STDOUT: fn @Negate.1(%a.param_patt: %i32) -> %i32 = "int.snegate"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %LeftShift.ref.loc8: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] +// CHECK:STDOUT: %LeftShift.ref.loc8: %LeftShift.type.1 = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_31.loc8: Core.IntLiteral = int_value 31 [template = constants.%int_31.1] -// CHECK:STDOUT: %impl.elem0.loc8_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc8_29: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc8_29: = bound_method %int_1.loc8, %impl.elem0.loc8_29 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc8_29: = specific_function %Convert.bound.loc8_29, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc8_29: init %i32 = call %Convert.specific_fn.loc8_29(%int_1.loc8) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc8_29.1: %i32 = value_of_initializer %int.convert_checked.loc8_29 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc8_29.2: %i32 = converted %int_1.loc8, %.loc8_29.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc8_32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc8_32: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc8_32: = bound_method %int_31.loc8, %impl.elem0.loc8_32 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc8_32: = specific_function %Convert.bound.loc8_32, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc8_32: init %i32 = call %Convert.specific_fn.loc8_32(%int_31.loc8) [template = constants.%int_31.2] @@ -402,16 +356,16 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %.loc8_35.1: %i32 = value_of_initializer %int.left_shift.loc8 [template = constants.%int_-2147483648] // CHECK:STDOUT: %.loc8_35.2: %i32 = converted %int.left_shift.loc8, %.loc8_35.1 [template = constants.%int_-2147483648] // CHECK:STDOUT: %size_1: %i32 = bind_name size_1, %.loc8_35.2 -// CHECK:STDOUT: %LeftShift.ref.loc13: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] +// CHECK:STDOUT: %LeftShift.ref.loc13: %LeftShift.type.1 = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %impl.elem0.loc13_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13_29: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13_29: = bound_method %int_1.loc13, %impl.elem0.loc13_29 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc13_29: = specific_function %Convert.bound.loc13_29, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc13_29: init %i32 = call %Convert.specific_fn.loc13_29(%int_1.loc13) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc13_29.1: %i32 = value_of_initializer %int.convert_checked.loc13_29 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc13_29.2: %i32 = converted %int_1.loc13, %.loc13_29.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc13_32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13_32: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13_32: = bound_method %int_32.loc13, %impl.elem0.loc13_32 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc13_32: = specific_function %Convert.bound.loc13_32, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc13_32: init %i32 = call %Convert.specific_fn.loc13_32(%int_32.loc13) [template = constants.%int_32.2] @@ -421,16 +375,16 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %.loc13_35.1: %i32 = value_of_initializer %int.left_shift.loc13 [template = ] // CHECK:STDOUT: %.loc13_35.2: %i32 = converted %int.left_shift.loc13, %.loc13_35.1 [template = ] // CHECK:STDOUT: %size_2: %i32 = bind_name size_2, %.loc13_35.2 -// CHECK:STDOUT: %LeftShift.ref.loc18: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] +// CHECK:STDOUT: %LeftShift.ref.loc18: %LeftShift.type.1 = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %int_1.loc18: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_33: Core.IntLiteral = int_value 33 [template = constants.%int_33.1] -// CHECK:STDOUT: %impl.elem0.loc18_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc18_29: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc18_29: = bound_method %int_1.loc18, %impl.elem0.loc18_29 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc18_29: = specific_function %Convert.bound.loc18_29, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc18_29: init %i32 = call %Convert.specific_fn.loc18_29(%int_1.loc18) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc18_29.1: %i32 = value_of_initializer %int.convert_checked.loc18_29 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc18_29.2: %i32 = converted %int_1.loc18, %.loc18_29.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc18_32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc18_32: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc18_32: = bound_method %int_33, %impl.elem0.loc18_32 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc18_32: = specific_function %Convert.bound.loc18_32, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc18_32: init %i32 = call %Convert.specific_fn.loc18_32(%int_33) [template = constants.%int_33.2] @@ -440,16 +394,16 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %.loc18_35.1: %i32 = value_of_initializer %int.left_shift.loc18 [template = ] // CHECK:STDOUT: %.loc18_35.2: %i32 = converted %int.left_shift.loc18, %.loc18_35.1 [template = ] // CHECK:STDOUT: %size_3: %i32 = bind_name size_3, %.loc18_35.2 -// CHECK:STDOUT: %LeftShift.ref.loc21: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] +// CHECK:STDOUT: %LeftShift.ref.loc21: %LeftShift.type.1 = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %int_1000.loc21: Core.IntLiteral = int_value 1000 [template = constants.%int_1000.1] // CHECK:STDOUT: %int_31.loc21: Core.IntLiteral = int_value 31 [template = constants.%int_31.1] -// CHECK:STDOUT: %impl.elem0.loc21_33: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc21_33: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc21_33: = bound_method %int_1000.loc21, %impl.elem0.loc21_33 [template = constants.%Convert.bound.5] // CHECK:STDOUT: %Convert.specific_fn.loc21_33: = specific_function %Convert.bound.loc21_33, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.5] // CHECK:STDOUT: %int.convert_checked.loc21_33: init %i32 = call %Convert.specific_fn.loc21_33(%int_1000.loc21) [template = constants.%int_1000.2] // CHECK:STDOUT: %.loc21_33.1: %i32 = value_of_initializer %int.convert_checked.loc21_33 [template = constants.%int_1000.2] // CHECK:STDOUT: %.loc21_33.2: %i32 = converted %int_1000.loc21, %.loc21_33.1 [template = constants.%int_1000.2] -// CHECK:STDOUT: %impl.elem0.loc21_39: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc21_39: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc21_39: = bound_method %int_31.loc21, %impl.elem0.loc21_39 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc21_39: = specific_function %Convert.bound.loc21_39, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc21_39: init %i32 = call %Convert.specific_fn.loc21_39(%int_31.loc21) [template = constants.%int_31.2] @@ -459,16 +413,16 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %.loc21_42.1: %i32 = value_of_initializer %int.left_shift.loc21 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc21_42.2: %i32 = converted %int.left_shift.loc21, %.loc21_42.1 [template = constants.%int_0.1] // CHECK:STDOUT: %overflow_1: %i32 = bind_name overflow_1, %.loc21_42.2 -// CHECK:STDOUT: %LeftShift.ref.loc26: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] +// CHECK:STDOUT: %LeftShift.ref.loc26: %LeftShift.type.1 = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %int_1000.loc26: Core.IntLiteral = int_value 1000 [template = constants.%int_1000.1] // CHECK:STDOUT: %int_32.loc26: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %impl.elem0.loc26_33: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc26_33: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc26_33: = bound_method %int_1000.loc26, %impl.elem0.loc26_33 [template = constants.%Convert.bound.5] // CHECK:STDOUT: %Convert.specific_fn.loc26_33: = specific_function %Convert.bound.loc26_33, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.5] // CHECK:STDOUT: %int.convert_checked.loc26_33: init %i32 = call %Convert.specific_fn.loc26_33(%int_1000.loc26) [template = constants.%int_1000.2] // CHECK:STDOUT: %.loc26_33.1: %i32 = value_of_initializer %int.convert_checked.loc26_33 [template = constants.%int_1000.2] // CHECK:STDOUT: %.loc26_33.2: %i32 = converted %int_1000.loc26, %.loc26_33.1 [template = constants.%int_1000.2] -// CHECK:STDOUT: %impl.elem0.loc26_39: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc26_39: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc26_39: = bound_method %int_32.loc26, %impl.elem0.loc26_39 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc26_39: = specific_function %Convert.bound.loc26_39, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc26_39: init %i32 = call %Convert.specific_fn.loc26_39(%int_32.loc26) [template = constants.%int_32.2] @@ -478,16 +432,16 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %.loc26_42.1: %i32 = value_of_initializer %int.left_shift.loc26 [template = ] // CHECK:STDOUT: %.loc26_42.2: %i32 = converted %int.left_shift.loc26, %.loc26_42.1 [template = ] // CHECK:STDOUT: %overflow_2: %i32 = bind_name overflow_2, %.loc26_42.2 -// CHECK:STDOUT: %LeftShift.ref.loc29: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] +// CHECK:STDOUT: %LeftShift.ref.loc29: %LeftShift.type.1 = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %int_0.loc29: Core.IntLiteral = int_value 0 [template = constants.%int_0.2] // CHECK:STDOUT: %int_31.loc29: Core.IntLiteral = int_value 31 [template = constants.%int_31.1] -// CHECK:STDOUT: %impl.elem0.loc29_36: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc29_36: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc29_36: = bound_method %int_0.loc29, %impl.elem0.loc29_36 [template = constants.%Convert.bound.6] // CHECK:STDOUT: %Convert.specific_fn.loc29_36: = specific_function %Convert.bound.loc29_36, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.6] // CHECK:STDOUT: %int.convert_checked.loc29_36: init %i32 = call %Convert.specific_fn.loc29_36(%int_0.loc29) [template = constants.%int_0.1] // CHECK:STDOUT: %.loc29_36.1: %i32 = value_of_initializer %int.convert_checked.loc29_36 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc29_36.2: %i32 = converted %int_0.loc29, %.loc29_36.1 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc29_39: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc29_39: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc29_39: = bound_method %int_31.loc29, %impl.elem0.loc29_39 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc29_39: = specific_function %Convert.bound.loc29_39, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc29_39: init %i32 = call %Convert.specific_fn.loc29_39(%int_31.loc29) [template = constants.%int_31.2] @@ -497,16 +451,16 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %.loc29_42.1: %i32 = value_of_initializer %int.left_shift.loc29 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc29_42.2: %i32 = converted %int.left_shift.loc29, %.loc29_42.1 [template = constants.%int_0.1] // CHECK:STDOUT: %no_overflow_1: %i32 = bind_name no_overflow_1, %.loc29_42.2 -// CHECK:STDOUT: %LeftShift.ref.loc34: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] +// CHECK:STDOUT: %LeftShift.ref.loc34: %LeftShift.type.1 = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %int_0.loc34: Core.IntLiteral = int_value 0 [template = constants.%int_0.2] // CHECK:STDOUT: %int_32.loc34: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %impl.elem0.loc34_36: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc34_36: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc34_36: = bound_method %int_0.loc34, %impl.elem0.loc34_36 [template = constants.%Convert.bound.6] // CHECK:STDOUT: %Convert.specific_fn.loc34_36: = specific_function %Convert.bound.loc34_36, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.6] // CHECK:STDOUT: %int.convert_checked.loc34_36: init %i32 = call %Convert.specific_fn.loc34_36(%int_0.loc34) [template = constants.%int_0.1] // CHECK:STDOUT: %.loc34_36.1: %i32 = value_of_initializer %int.convert_checked.loc34_36 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc34_36.2: %i32 = converted %int_0.loc34, %.loc34_36.1 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc34_39: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc34_39: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc34_39: = bound_method %int_32.loc34, %impl.elem0.loc34_39 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc34_39: = specific_function %Convert.bound.loc34_39, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc34_39: init %i32 = call %Convert.specific_fn.loc34_39(%int_32.loc34) [template = constants.%int_32.2] @@ -516,18 +470,18 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %.loc34_42.1: %i32 = value_of_initializer %int.left_shift.loc34 [template = ] // CHECK:STDOUT: %.loc34_42.2: %i32 = converted %int.left_shift.loc34, %.loc34_42.1 [template = ] // CHECK:STDOUT: %no_overflow_2: %i32 = bind_name no_overflow_2, %.loc34_42.2 -// CHECK:STDOUT: %LeftShift.ref.loc40: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] +// CHECK:STDOUT: %LeftShift.ref.loc40: %LeftShift.type.1 = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %int_1.loc40_31: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_1.loc40_41: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc40_41: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc40_41: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc40_41: = bound_method %int_1.loc40_41, %impl.elem0.loc40_41 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc40_41: = specific_function %Convert.bound.loc40_41, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc40_41: init %i32 = call %Convert.specific_fn.loc40_41(%int_1.loc40_41) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc40_41.1: %i32 = value_of_initializer %int.convert_checked.loc40_41 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc40_41.2: %i32 = converted %int_1.loc40_41, %.loc40_41.1 [template = constants.%int_1.2] // CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc40_41.2) [template = constants.%int_-1] -// CHECK:STDOUT: %impl.elem0.loc40_31: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc40_31: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc40_31: = bound_method %int_1.loc40_31, %impl.elem0.loc40_31 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc40_31: = specific_function %Convert.bound.loc40_31, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc40_31: init %i32 = call %Convert.specific_fn.loc40_31(%int_1.loc40_31) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/builtins/int/less.carbon b/toolchain/check/testdata/builtins/int/less.carbon index d5abc7671e30..6948816cc661 100644 --- a/toolchain/check/testdata/builtins/int/less.carbon +++ b/toolchain/check/testdata/builtins/int/less.carbon @@ -32,37 +32,35 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Less.type: type = fn_type @Less [template] // CHECK:STDOUT: %Less: %Less.type = struct_value () [template] -// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] +// CHECK:STDOUT: %Negate.type.1: type = fn_type @Negate.1 [template] +// CHECK:STDOUT: %Negate: %Negate.type.1 = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [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: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %true: bool = bool_literal true [template] // CHECK:STDOUT: %false: bool = bool_literal false [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %int_-1: %i32 = int_value -1 [template] @@ -73,8 +71,8 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .Bool = %import_ref.2 -// CHECK:STDOUT: .ImplicitAs = %import_ref.3 +// CHECK:STDOUT: .Bool = %import_ref.5 +// CHECK:STDOUT: .ImplicitAs = %import_ref.6 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -100,13 +98,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc2_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_12: init type = call constants.%Int(%int_32.loc2_12) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_12.1: type = value_of_initializer %int.make_type_signed.loc2_12 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_12.2: type = converted %int.make_type_signed.loc2_12, %.loc2_12.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_20: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_20: init type = call constants.%Int(%int_32.loc2_20) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_20.1: type = value_of_initializer %int.make_type_signed.loc2_20 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_20.2: type = converted %int.make_type_signed.loc2_20, %.loc2_20.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_28.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_28.2: type = converted %bool.make_type, %.loc2_28.1 [template = bool] @@ -117,20 +111,16 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %Negate.decl: %Negate.type.1 = fn_decl @Negate.1 [template = constants.%Negate] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc3_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc3_14: init type = call constants.%Int(%int_32.loc3_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %int.make_type_signed.loc3_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc3_14.2: type = converted %int.make_type_signed.loc3_14, %.loc3_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc3_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc3_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc3_22: init type = call constants.%Int(%int_32.loc3_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc3_22.1: type = value_of_initializer %int.make_type_signed.loc3_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc3_22.2: type = converted %int.make_type_signed.loc3_22, %.loc3_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc3_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -160,13 +150,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc16_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc16_19: init type = call constants.%Int(%int_32.loc16_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %int.make_type_signed.loc16_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_19.2: type = converted %int.make_type_signed.loc16_19, %.loc16_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc16_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc16_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc16_27: init type = call constants.%Int(%int_32.loc16_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_27.1: type = value_of_initializer %int.make_type_signed.loc16_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_27.2: type = converted %int.make_type_signed.loc16_27, %.loc16_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc16_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type, %.loc16_35.1 [template = bool] @@ -180,7 +166,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True @@ -188,7 +174,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False @@ -197,7 +183,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @Less(%a.param_patt: %i32, %b.param_patt: %i32) -> bool = "int.less"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Negate(%a.param_patt: %i32) -> %i32 = "int.snegate"; +// CHECK:STDOUT: fn @Negate.1(%a.param_patt: %i32) -> %i32 = "int.snegate"; // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%true_.param_patt: %True, %false_.param_patt: %False) { // CHECK:STDOUT: !entry: @@ -205,13 +191,13 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %Less.ref.loc9: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc9_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_21: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_21: = bound_method %int_1.loc9, %impl.elem0.loc9_21 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc9_21: = specific_function %Convert.bound.loc9_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc9_21: init %i32 = call %Convert.specific_fn.loc9_21(%int_1.loc9) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc9_21.1: %i32 = value_of_initializer %int.convert_checked.loc9_21 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc9_21.2: %i32 = converted %int_1.loc9, %.loc9_21.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc9_24: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_24: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_24: = bound_method %int_2, %impl.elem0.loc9_24 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc9_24: = specific_function %Convert.bound.loc9_24, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc9_24: init %i32 = call %Convert.specific_fn.loc9_24(%int_2) [template = constants.%int_2.2] @@ -236,13 +222,13 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %Less.ref.loc10: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] // CHECK:STDOUT: %int_1.loc10_22: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_1.loc10_25: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc10_22: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc10_22: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc10_22: = bound_method %int_1.loc10_22, %impl.elem0.loc10_22 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc10_22: = specific_function %Convert.bound.loc10_22, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc10_22: init %i32 = call %Convert.specific_fn.loc10_22(%int_1.loc10_22) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc10_22.1: %i32 = value_of_initializer %int.convert_checked.loc10_22 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc10_22.2: %i32 = converted %int_1.loc10_22, %.loc10_22.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc10_25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc10_25: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc10_25: = bound_method %int_1.loc10_25, %impl.elem0.loc10_25 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc10_25: = specific_function %Convert.bound.loc10_25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc10_25: init %i32 = call %Convert.specific_fn.loc10_25(%int_1.loc10_25) [template = constants.%int_1.2] @@ -267,13 +253,13 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %Less.ref.loc11: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_0.loc11: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc11_22: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_22: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_22: = bound_method %int_1.loc11, %impl.elem0.loc11_22 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_22: = specific_function %Convert.bound.loc11_22, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_22: init %i32 = call %Convert.specific_fn.loc11_22(%int_1.loc11) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc11_22.1: %i32 = value_of_initializer %int.convert_checked.loc11_22 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc11_22.2: %i32 = converted %int_1.loc11, %.loc11_22.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc11_25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_25: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_25: = bound_method %int_0.loc11, %impl.elem0.loc11_25 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc11_25: = specific_function %Convert.bound.loc11_25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc11_25: init %i32 = call %Convert.specific_fn.loc11_25(%int_0.loc11) [template = constants.%int_0.2] @@ -296,9 +282,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc11_14.3: type = block_arg !if.expr.result.loc11 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc12: %True = name_ref true_, %true_ // CHECK:STDOUT: %Less.ref.loc12: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] -// CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc12: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc12_28: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_28: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_28: = bound_method %int_1.loc12, %impl.elem0.loc12_28 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc12_28: = specific_function %Convert.bound.loc12_28, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc12_28: init %i32 = call %Convert.specific_fn.loc12_28(%int_1.loc12) [template = constants.%int_1.2] @@ -308,7 +294,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %int_0.loc12: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc12_29.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%int_-1] // CHECK:STDOUT: %.loc12_29.2: %i32 = converted %int.snegate.loc12, %.loc12_29.1 [template = constants.%int_-1] -// CHECK:STDOUT: %impl.elem0.loc12_32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_32: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_32: = bound_method %int_0.loc12, %impl.elem0.loc12_32 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc12_32: = specific_function %Convert.bound.loc12_32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc12_32: init %i32 = call %Convert.specific_fn.loc12_32(%int_0.loc12) [template = constants.%int_0.2] @@ -332,16 +318,16 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %false_.ref.loc13: %False = name_ref false_, %false_ // CHECK:STDOUT: %Less.ref.loc13: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] // CHECK:STDOUT: %int_0.loc13: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %Negate.ref.loc13: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc13: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc13_32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13_32: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13_32: = bound_method %int_1.loc13, %impl.elem0.loc13_32 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc13_32: = specific_function %Convert.bound.loc13_32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc13_32: init %i32 = call %Convert.specific_fn.loc13_32(%int_1.loc13) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc13_32.1: %i32 = value_of_initializer %int.convert_checked.loc13_32 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc13_32.2: %i32 = converted %int_1.loc13, %.loc13_32.1 [template = constants.%int_1.2] // CHECK:STDOUT: %int.snegate.loc13: init %i32 = call %Negate.ref.loc13(%.loc13_32.2) [template = constants.%int_-1] -// CHECK:STDOUT: %impl.elem0.loc13_22: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13_22: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13_22: = bound_method %int_0.loc13, %impl.elem0.loc13_22 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc13_22: = specific_function %Convert.bound.loc13_22, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc13_22: init %i32 = call %Convert.specific_fn.loc13_22(%int_0.loc13) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/builtins/int/less_eq.carbon b/toolchain/check/testdata/builtins/int/less_eq.carbon index 87f787350caf..0febd2da77e5 100644 --- a/toolchain/check/testdata/builtins/int/less_eq.carbon +++ b/toolchain/check/testdata/builtins/int/less_eq.carbon @@ -32,36 +32,34 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %LessEq.type: type = fn_type @LessEq [template] // CHECK:STDOUT: %LessEq: %LessEq.type = struct_value () [template] -// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] +// CHECK:STDOUT: %Negate.type.1: type = fn_type @Negate.1 [template] +// CHECK:STDOUT: %Negate: %Negate.type.1 = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [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: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %true: bool = bool_literal true [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %false: bool = bool_literal false [template] @@ -73,8 +71,8 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .Bool = %import_ref.2 -// CHECK:STDOUT: .ImplicitAs = %import_ref.3 +// CHECK:STDOUT: .Bool = %import_ref.5 +// CHECK:STDOUT: .ImplicitAs = %import_ref.6 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -100,13 +98,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc2_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_14: init type = call constants.%Int(%int_32.loc2_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_14.1: type = value_of_initializer %int.make_type_signed.loc2_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_14.2: type = converted %int.make_type_signed.loc2_14, %.loc2_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_22: init type = call constants.%Int(%int_32.loc2_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_22.1: type = value_of_initializer %int.make_type_signed.loc2_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_22.2: type = converted %int.make_type_signed.loc2_22, %.loc2_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_30.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_30.2: type = converted %bool.make_type, %.loc2_30.1 [template = bool] @@ -117,20 +111,16 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %Negate.decl: %Negate.type.1 = fn_decl @Negate.1 [template = constants.%Negate] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc3_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc3_14: init type = call constants.%Int(%int_32.loc3_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %int.make_type_signed.loc3_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc3_14.2: type = converted %int.make_type_signed.loc3_14, %.loc3_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc3_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc3_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc3_22: init type = call constants.%Int(%int_32.loc3_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc3_22.1: type = value_of_initializer %int.make_type_signed.loc3_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc3_22.2: type = converted %int.make_type_signed.loc3_22, %.loc3_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc3_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -160,13 +150,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc16_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc16_19: init type = call constants.%Int(%int_32.loc16_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %int.make_type_signed.loc16_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_19.2: type = converted %int.make_type_signed.loc16_19, %.loc16_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc16_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc16_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc16_27: init type = call constants.%Int(%int_32.loc16_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_27.1: type = value_of_initializer %int.make_type_signed.loc16_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_27.2: type = converted %int.make_type_signed.loc16_27, %.loc16_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc16_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type, %.loc16_35.1 [template = bool] @@ -180,7 +166,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True @@ -188,7 +174,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False @@ -197,7 +183,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: fn @LessEq(%a.param_patt: %i32, %b.param_patt: %i32) -> bool = "int.less_eq"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Negate(%a.param_patt: %i32) -> %i32 = "int.snegate"; +// CHECK:STDOUT: fn @Negate.1(%a.param_patt: %i32) -> %i32 = "int.snegate"; // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%true_.param_patt: %True, %false_.param_patt: %False) { // CHECK:STDOUT: !entry: @@ -205,13 +191,13 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %LessEq.ref.loc9: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc9_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_23: = bound_method %int_1.loc9, %impl.elem0.loc9_23 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc9_23: = specific_function %Convert.bound.loc9_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc9_23: init %i32 = call %Convert.specific_fn.loc9_23(%int_1.loc9) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc9_23.1: %i32 = value_of_initializer %int.convert_checked.loc9_23 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc9_23.2: %i32 = converted %int_1.loc9, %.loc9_23.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc9_26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_26: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_26: = bound_method %int_2, %impl.elem0.loc9_26 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc9_26: = specific_function %Convert.bound.loc9_26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc9_26: init %i32 = call %Convert.specific_fn.loc9_26(%int_2) [template = constants.%int_2.2] @@ -236,13 +222,13 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %LessEq.ref.loc10: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] // CHECK:STDOUT: %int_1.loc10_23: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_1.loc10_26: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc10_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc10_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc10_23: = bound_method %int_1.loc10_23, %impl.elem0.loc10_23 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc10_23: = specific_function %Convert.bound.loc10_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc10_23: init %i32 = call %Convert.specific_fn.loc10_23(%int_1.loc10_23) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc10_23.1: %i32 = value_of_initializer %int.convert_checked.loc10_23 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc10_23.2: %i32 = converted %int_1.loc10_23, %.loc10_23.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc10_26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc10_26: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc10_26: = bound_method %int_1.loc10_26, %impl.elem0.loc10_26 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc10_26: = specific_function %Convert.bound.loc10_26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc10_26: init %i32 = call %Convert.specific_fn.loc10_26(%int_1.loc10_26) [template = constants.%int_1.2] @@ -267,13 +253,13 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %LessEq.ref.loc11: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_0.loc11: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc11_24: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_24: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_24: = bound_method %int_1.loc11, %impl.elem0.loc11_24 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_24: = specific_function %Convert.bound.loc11_24, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_24: init %i32 = call %Convert.specific_fn.loc11_24(%int_1.loc11) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc11_24.1: %i32 = value_of_initializer %int.convert_checked.loc11_24 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc11_24.2: %i32 = converted %int_1.loc11, %.loc11_24.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc11_27: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_27: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_27: = bound_method %int_0.loc11, %impl.elem0.loc11_27 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc11_27: = specific_function %Convert.bound.loc11_27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc11_27: init %i32 = call %Convert.specific_fn.loc11_27(%int_0.loc11) [template = constants.%int_0.2] @@ -296,9 +282,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc11_14.3: type = block_arg !if.expr.result.loc11 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc12: %True = name_ref true_, %true_ // CHECK:STDOUT: %LessEq.ref.loc12: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] -// CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc12: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc12_30: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_30: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_30: = bound_method %int_1.loc12, %impl.elem0.loc12_30 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc12_30: = specific_function %Convert.bound.loc12_30, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc12_30: init %i32 = call %Convert.specific_fn.loc12_30(%int_1.loc12) [template = constants.%int_1.2] @@ -308,7 +294,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %int_0.loc12: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc12_31.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%int_-1] // CHECK:STDOUT: %.loc12_31.2: %i32 = converted %int.snegate.loc12, %.loc12_31.1 [template = constants.%int_-1] -// CHECK:STDOUT: %impl.elem0.loc12_34: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_34: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_34: = bound_method %int_0.loc12, %impl.elem0.loc12_34 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc12_34: = specific_function %Convert.bound.loc12_34, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc12_34: init %i32 = call %Convert.specific_fn.loc12_34(%int_0.loc12) [template = constants.%int_0.2] @@ -332,16 +318,16 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %false_.ref.loc13: %False = name_ref false_, %false_ // CHECK:STDOUT: %LessEq.ref.loc13: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] // CHECK:STDOUT: %int_0.loc13: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %Negate.ref.loc13: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc13: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc13_34: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13_34: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13_34: = bound_method %int_1.loc13, %impl.elem0.loc13_34 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc13_34: = specific_function %Convert.bound.loc13_34, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc13_34: init %i32 = call %Convert.specific_fn.loc13_34(%int_1.loc13) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc13_34.1: %i32 = value_of_initializer %int.convert_checked.loc13_34 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc13_34.2: %i32 = converted %int_1.loc13, %.loc13_34.1 [template = constants.%int_1.2] // CHECK:STDOUT: %int.snegate.loc13: init %i32 = call %Negate.ref.loc13(%.loc13_34.2) [template = constants.%int_-1] -// CHECK:STDOUT: %impl.elem0.loc13_24: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13_24: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13_24: = bound_method %int_0.loc13, %impl.elem0.loc13_24 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc13_24: = specific_function %Convert.bound.loc13_24, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc13_24: init %i32 = call %Convert.specific_fn.loc13_24(%int_0.loc13) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/builtins/int/make_type_signed.carbon b/toolchain/check/testdata/builtins/int/make_type_signed.carbon index cd8315d1700e..5f5a11aebedd 100644 --- a/toolchain/check/testdata/builtins/int/make_type_signed.carbon +++ b/toolchain/check/testdata/builtins/int/make_type_signed.carbon @@ -146,21 +146,21 @@ var m: Int(1000000000); // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %i64: type = int_type signed, %int_64 [template] +// CHECK:STDOUT: %i64.builtin: type = int_type signed, %int_64 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %int_13: Core.IntLiteral = int_value 13 [template] -// CHECK:STDOUT: %i13: type = int_type signed, %int_13 [template] +// CHECK:STDOUT: %i13.builtin: type = int_type signed, %int_13 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [template] // CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [template] // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic] -// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic] +// CHECK:STDOUT: %iN.builtin: type = int_type signed, %N [symbolic] // CHECK:STDOUT: %Symbolic.type: type = fn_type @Symbolic [template] // CHECK:STDOUT: %Symbolic: %Symbolic.type = struct_value () [template] -// CHECK:STDOUT: %require_complete: = require_complete_type %iN [symbolic] +// CHECK:STDOUT: %require_complete: = require_complete_type %iN.builtin [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -184,54 +184,54 @@ var m: Int(1000000000); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %n.patt: %i64 = binding_pattern n -// CHECK:STDOUT: %n.param_patt: %i64 = value_param_pattern %n.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %i64 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %i64 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %n.patt: %i64.builtin = binding_pattern n +// CHECK:STDOUT: %n.param_patt: %i64.builtin = value_param_pattern %n.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %i64.builtin = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %i64.builtin = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Int.ref.loc6_9: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %int_64.loc6_13: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %int.make_type_signed.loc6_15: init type = call %Int.ref.loc6_9(%int_64.loc6_13) [template = constants.%i64] -// CHECK:STDOUT: %.loc6_15.1: type = value_of_initializer %int.make_type_signed.loc6_15 [template = constants.%i64] -// CHECK:STDOUT: %.loc6_15.2: type = converted %int.make_type_signed.loc6_15, %.loc6_15.1 [template = constants.%i64] +// CHECK:STDOUT: %int.make_type_signed.loc6_15: init type = call %Int.ref.loc6_9(%int_64.loc6_13) [template = constants.%i64.builtin] +// CHECK:STDOUT: %.loc6_15.1: type = value_of_initializer %int.make_type_signed.loc6_15 [template = constants.%i64.builtin] +// CHECK:STDOUT: %.loc6_15.2: type = converted %int.make_type_signed.loc6_15, %.loc6_15.1 [template = constants.%i64.builtin] // CHECK:STDOUT: %Int.ref.loc6_21: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %int_64.loc6_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %int.make_type_signed.loc6_27: init type = call %Int.ref.loc6_21(%int_64.loc6_25) [template = constants.%i64] -// CHECK:STDOUT: %.loc6_27.1: type = value_of_initializer %int.make_type_signed.loc6_27 [template = constants.%i64] -// CHECK:STDOUT: %.loc6_27.2: type = converted %int.make_type_signed.loc6_27, %.loc6_27.1 [template = constants.%i64] -// CHECK:STDOUT: %n.param: %i64 = value_param runtime_param0 -// CHECK:STDOUT: %n: %i64 = bind_name n, %n.param -// CHECK:STDOUT: %return.param: ref %i64 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %i64 = return_slot %return.param +// CHECK:STDOUT: %int.make_type_signed.loc6_27: init type = call %Int.ref.loc6_21(%int_64.loc6_25) [template = constants.%i64.builtin] +// CHECK:STDOUT: %.loc6_27.1: type = value_of_initializer %int.make_type_signed.loc6_27 [template = constants.%i64.builtin] +// CHECK:STDOUT: %.loc6_27.2: type = converted %int.make_type_signed.loc6_27, %.loc6_27.1 [template = constants.%i64.builtin] +// CHECK:STDOUT: %n.param: %i64.builtin = value_param runtime_param0 +// CHECK:STDOUT: %n: %i64.builtin = bind_name n, %n.param +// CHECK:STDOUT: %return.param: ref %i64.builtin = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %i64.builtin = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %n.patt: %i13 = binding_pattern n -// CHECK:STDOUT: %n.param_patt: %i13 = value_param_pattern %n.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %i13 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %i13 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %n.patt: %i13.builtin = binding_pattern n +// CHECK:STDOUT: %n.param_patt: %i13.builtin = value_param_pattern %n.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %i13.builtin = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %i13.builtin = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Int.ref.loc10_9: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %int_13.loc10_13: Core.IntLiteral = int_value 13 [template = constants.%int_13] -// CHECK:STDOUT: %int.make_type_signed.loc10_15: init type = call %Int.ref.loc10_9(%int_13.loc10_13) [template = constants.%i13] -// CHECK:STDOUT: %.loc10_15.1: type = value_of_initializer %int.make_type_signed.loc10_15 [template = constants.%i13] -// CHECK:STDOUT: %.loc10_15.2: type = converted %int.make_type_signed.loc10_15, %.loc10_15.1 [template = constants.%i13] +// CHECK:STDOUT: %int.make_type_signed.loc10_15: init type = call %Int.ref.loc10_9(%int_13.loc10_13) [template = constants.%i13.builtin] +// CHECK:STDOUT: %.loc10_15.1: type = value_of_initializer %int.make_type_signed.loc10_15 [template = constants.%i13.builtin] +// CHECK:STDOUT: %.loc10_15.2: type = converted %int.make_type_signed.loc10_15, %.loc10_15.1 [template = constants.%i13.builtin] // CHECK:STDOUT: %Int.ref.loc10_21: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %int_13.loc10_25: Core.IntLiteral = int_value 13 [template = constants.%int_13] -// CHECK:STDOUT: %int.make_type_signed.loc10_27: init type = call %Int.ref.loc10_21(%int_13.loc10_25) [template = constants.%i13] -// CHECK:STDOUT: %.loc10_27.1: type = value_of_initializer %int.make_type_signed.loc10_27 [template = constants.%i13] -// CHECK:STDOUT: %.loc10_27.2: type = converted %int.make_type_signed.loc10_27, %.loc10_27.1 [template = constants.%i13] -// CHECK:STDOUT: %n.param: %i13 = value_param runtime_param0 -// CHECK:STDOUT: %n: %i13 = bind_name n, %n.param -// CHECK:STDOUT: %return.param: ref %i13 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %i13 = return_slot %return.param +// CHECK:STDOUT: %int.make_type_signed.loc10_27: init type = call %Int.ref.loc10_21(%int_13.loc10_25) [template = constants.%i13.builtin] +// CHECK:STDOUT: %.loc10_27.1: type = value_of_initializer %int.make_type_signed.loc10_27 [template = constants.%i13.builtin] +// CHECK:STDOUT: %.loc10_27.2: type = converted %int.make_type_signed.loc10_27, %.loc10_27.1 [template = constants.%i13.builtin] +// CHECK:STDOUT: %n.param: %i13.builtin = value_param runtime_param0 +// CHECK:STDOUT: %n: %i13.builtin = bind_name n, %n.param +// CHECK:STDOUT: %return.param: ref %i13.builtin = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %i13.builtin = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %Symbolic.decl: %Symbolic.type = fn_decl @Symbolic [template = constants.%Symbolic] { // CHECK:STDOUT: %N.patt.loc14_13.1: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc14_13.2 (constants.%N.patt)] // CHECK:STDOUT: %N.param_patt: Core.IntLiteral = value_param_pattern %N.patt.loc14_13.1, runtime_param [symbolic = %N.patt.loc14_13.2 (constants.%N.patt)] -// CHECK:STDOUT: %x.patt: @Symbolic.%iN (%iN) = binding_pattern x -// CHECK:STDOUT: %x.param_patt: @Symbolic.%iN (%iN) = value_param_pattern %x.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: @Symbolic.%iN (%iN) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @Symbolic.%iN (%iN) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %x.patt: @Symbolic.%iN.builtin (%iN.builtin) = binding_pattern x +// CHECK:STDOUT: %x.param_patt: @Symbolic.%iN.builtin (%iN.builtin) = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @Symbolic.%iN.builtin (%iN.builtin) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @Symbolic.%iN.builtin (%iN.builtin) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] @@ -239,34 +239,34 @@ var m: Int(1000000000); // CHECK:STDOUT: %.loc14_28.2: type = converted %int_literal.make_type, %.loc14_28.1 [template = Core.IntLiteral] // CHECK:STDOUT: %Int.ref.loc14_34: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %N.ref.loc14_38: Core.IntLiteral = name_ref N, %N.loc14_13.1 [symbolic = %N.loc14_13.2 (constants.%N)] -// CHECK:STDOUT: %int.make_type_signed.loc14_39: init type = call %Int.ref.loc14_34(%N.ref.loc14_38) [symbolic = %iN (constants.%iN)] -// CHECK:STDOUT: %.loc14_39.1: type = value_of_initializer %int.make_type_signed.loc14_39 [symbolic = %iN (constants.%iN)] -// CHECK:STDOUT: %.loc14_39.2: type = converted %int.make_type_signed.loc14_39, %.loc14_39.1 [symbolic = %iN (constants.%iN)] +// CHECK:STDOUT: %int.make_type_signed.loc14_39: init type = call %Int.ref.loc14_34(%N.ref.loc14_38) [symbolic = %iN.builtin (constants.%iN.builtin)] +// CHECK:STDOUT: %.loc14_39.1: type = value_of_initializer %int.make_type_signed.loc14_39 [symbolic = %iN.builtin (constants.%iN.builtin)] +// CHECK:STDOUT: %.loc14_39.2: type = converted %int.make_type_signed.loc14_39, %.loc14_39.1 [symbolic = %iN.builtin (constants.%iN.builtin)] // CHECK:STDOUT: %Int.ref.loc14_45: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %N.ref.loc14_49: Core.IntLiteral = name_ref N, %N.loc14_13.1 [symbolic = %N.loc14_13.2 (constants.%N)] -// CHECK:STDOUT: %int.make_type_signed.loc14_50: init type = call %Int.ref.loc14_45(%N.ref.loc14_49) [symbolic = %iN (constants.%iN)] -// CHECK:STDOUT: %.loc14_50.1: type = value_of_initializer %int.make_type_signed.loc14_50 [symbolic = %iN (constants.%iN)] -// CHECK:STDOUT: %.loc14_50.2: type = converted %int.make_type_signed.loc14_50, %.loc14_50.1 [symbolic = %iN (constants.%iN)] +// CHECK:STDOUT: %int.make_type_signed.loc14_50: init type = call %Int.ref.loc14_45(%N.ref.loc14_49) [symbolic = %iN.builtin (constants.%iN.builtin)] +// CHECK:STDOUT: %.loc14_50.1: type = value_of_initializer %int.make_type_signed.loc14_50 [symbolic = %iN.builtin (constants.%iN.builtin)] +// CHECK:STDOUT: %.loc14_50.2: type = converted %int.make_type_signed.loc14_50, %.loc14_50.1 [symbolic = %iN.builtin (constants.%iN.builtin)] // CHECK:STDOUT: %N.param: Core.IntLiteral = value_param runtime_param // CHECK:STDOUT: %N.loc14_13.1: Core.IntLiteral = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc14_13.2 (constants.%N)] -// CHECK:STDOUT: %x.param: @Symbolic.%iN (%iN) = value_param runtime_param0 -// CHECK:STDOUT: %x: @Symbolic.%iN (%iN) = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref @Symbolic.%iN (%iN) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @Symbolic.%iN (%iN) = return_slot %return.param +// CHECK:STDOUT: %x.param: @Symbolic.%iN.builtin (%iN.builtin) = value_param runtime_param0 +// CHECK:STDOUT: %x: @Symbolic.%iN.builtin (%iN.builtin) = bind_name x, %x.param +// CHECK:STDOUT: %return.param: ref @Symbolic.%iN.builtin (%iN.builtin) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @Symbolic.%iN.builtin (%iN.builtin) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int(%n.param_patt: Core.IntLiteral) -> type = "int.make_type_signed" [from "types.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%n.param_patt: %i64) -> %i64 { +// CHECK:STDOUT: fn @F(%n.param_patt: %i64.builtin) -> %i64.builtin { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %n.ref: %i64 = name_ref n, %n +// CHECK:STDOUT: %n.ref: %i64.builtin = name_ref n, %n // CHECK:STDOUT: return %n.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%n.param_patt: %i13) -> %i13 { +// CHECK:STDOUT: fn @G(%n.param_patt: %i13.builtin) -> %i13.builtin { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %n.ref: %i13 = name_ref n, %n +// CHECK:STDOUT: %n.ref: %i13.builtin = name_ref n, %n // CHECK:STDOUT: return %n.ref // CHECK:STDOUT: } // CHECK:STDOUT: @@ -275,14 +275,14 @@ var m: Int(1000000000); // CHECK:STDOUT: generic fn @Symbolic(%N.loc14_13.1: Core.IntLiteral) { // CHECK:STDOUT: %N.loc14_13.2: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N.loc14_13.2 (constants.%N)] // CHECK:STDOUT: %N.patt.loc14_13.2: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc14_13.2 (constants.%N.patt)] -// CHECK:STDOUT: %iN: type = int_type signed, %N.loc14_13.2 [symbolic = %iN (constants.%iN)] +// CHECK:STDOUT: %iN.builtin: type = int_type signed, %N.loc14_13.2 [symbolic = %iN.builtin (constants.%iN.builtin)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type @Symbolic.%iN (%iN) [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type @Symbolic.%iN.builtin (%iN.builtin) [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%N.param_patt: Core.IntLiteral, %x.param_patt: @Symbolic.%iN (%iN)) -> @Symbolic.%iN (%iN) { +// CHECK:STDOUT: fn(%N.param_patt: Core.IntLiteral, %x.param_patt: @Symbolic.%iN.builtin (%iN.builtin)) -> @Symbolic.%iN.builtin (%iN.builtin) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @Symbolic.%iN (%iN) = name_ref x, %x +// CHECK:STDOUT: %x.ref: @Symbolic.%iN.builtin (%iN.builtin) = name_ref x, %x // CHECK:STDOUT: return %x.ref // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -290,7 +290,7 @@ var m: Int(1000000000); // CHECK:STDOUT: specific @Symbolic(constants.%N) { // CHECK:STDOUT: %N.loc14_13.2 => constants.%N // CHECK:STDOUT: %N.patt.loc14_13.2 => constants.%N -// CHECK:STDOUT: %iN => constants.%iN +// CHECK:STDOUT: %iN.builtin => constants.%iN.builtin // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_types.carbon @@ -299,29 +299,29 @@ var m: Int(1000000000); // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %i64: type = int_type signed, %int_64 [template] +// CHECK:STDOUT: %i64.builtin: type = int_type signed, %int_64 [template] // CHECK:STDOUT: %UseF.type: type = fn_type @UseF [template] // CHECK:STDOUT: %UseF: %UseF.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %int_13: Core.IntLiteral = int_value 13 [template] -// CHECK:STDOUT: %i13: type = int_type signed, %int_13 [template] +// CHECK:STDOUT: %i13.builtin: type = int_type signed, %int_13 [template] // CHECK:STDOUT: %UseG.type: type = fn_type @UseG [template] // CHECK:STDOUT: %UseG: %UseG.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %int_24: Core.IntLiteral = int_value 24 [template] -// CHECK:STDOUT: %i24: type = int_type signed, %int_24 [template] +// CHECK:STDOUT: %i24.builtin: type = int_type signed, %int_24 [template] // CHECK:STDOUT: %UseSymbolic.type: type = fn_type @UseSymbolic [template] // CHECK:STDOUT: %UseSymbolic: %UseSymbolic.type = struct_value () [template] // CHECK:STDOUT: %Symbolic.type: type = fn_type @Symbolic [template] // CHECK:STDOUT: %Symbolic: %Symbolic.type = struct_value () [template] // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic] -// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic] +// CHECK:STDOUT: %iN.builtin: type = int_type signed, %N [symbolic] // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic] -// CHECK:STDOUT: %require_complete: = require_complete_type %iN [symbolic] +// CHECK:STDOUT: %require_complete: = require_complete_type %iN.builtin [symbolic] // CHECK:STDOUT: %Symbolic.specific_fn: = specific_function %Symbolic, @Symbolic(%int_24) [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %i24 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %i24.builtin [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -351,129 +351,129 @@ var m: Int(1000000000); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %UseF.decl: %UseF.type = fn_decl @UseF [template = constants.%UseF] { -// CHECK:STDOUT: %n.patt: %i64 = binding_pattern n -// CHECK:STDOUT: %n.param_patt: %i64 = value_param_pattern %n.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %i64 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %i64 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %n.patt: %i64.builtin = binding_pattern n +// CHECK:STDOUT: %n.param_patt: %i64.builtin = value_param_pattern %n.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %i64.builtin = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %i64.builtin = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Int.ref.loc7_12: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %int_64.loc7_16: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %int.make_type_signed.loc7_18: init type = call %Int.ref.loc7_12(%int_64.loc7_16) [template = constants.%i64] -// CHECK:STDOUT: %.loc7_18.1: type = value_of_initializer %int.make_type_signed.loc7_18 [template = constants.%i64] -// CHECK:STDOUT: %.loc7_18.2: type = converted %int.make_type_signed.loc7_18, %.loc7_18.1 [template = constants.%i64] +// CHECK:STDOUT: %int.make_type_signed.loc7_18: init type = call %Int.ref.loc7_12(%int_64.loc7_16) [template = constants.%i64.builtin] +// CHECK:STDOUT: %.loc7_18.1: type = value_of_initializer %int.make_type_signed.loc7_18 [template = constants.%i64.builtin] +// CHECK:STDOUT: %.loc7_18.2: type = converted %int.make_type_signed.loc7_18, %.loc7_18.1 [template = constants.%i64.builtin] // CHECK:STDOUT: %Int.ref.loc7_24: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %int_64.loc7_28: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %int.make_type_signed.loc7_30: init type = call %Int.ref.loc7_24(%int_64.loc7_28) [template = constants.%i64] -// CHECK:STDOUT: %.loc7_30.1: type = value_of_initializer %int.make_type_signed.loc7_30 [template = constants.%i64] -// CHECK:STDOUT: %.loc7_30.2: type = converted %int.make_type_signed.loc7_30, %.loc7_30.1 [template = constants.%i64] -// CHECK:STDOUT: %n.param: %i64 = value_param runtime_param0 -// CHECK:STDOUT: %n: %i64 = bind_name n, %n.param -// CHECK:STDOUT: %return.param: ref %i64 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %i64 = return_slot %return.param +// CHECK:STDOUT: %int.make_type_signed.loc7_30: init type = call %Int.ref.loc7_24(%int_64.loc7_28) [template = constants.%i64.builtin] +// CHECK:STDOUT: %.loc7_30.1: type = value_of_initializer %int.make_type_signed.loc7_30 [template = constants.%i64.builtin] +// CHECK:STDOUT: %.loc7_30.2: type = converted %int.make_type_signed.loc7_30, %.loc7_30.1 [template = constants.%i64.builtin] +// CHECK:STDOUT: %n.param: %i64.builtin = value_param runtime_param0 +// CHECK:STDOUT: %n: %i64.builtin = bind_name n, %n.param +// CHECK:STDOUT: %return.param: ref %i64.builtin = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %i64.builtin = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %UseG.decl: %UseG.type = fn_decl @UseG [template = constants.%UseG] { -// CHECK:STDOUT: %n.patt: %i13 = binding_pattern n -// CHECK:STDOUT: %n.param_patt: %i13 = value_param_pattern %n.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %i13 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %i13 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %n.patt: %i13.builtin = binding_pattern n +// CHECK:STDOUT: %n.param_patt: %i13.builtin = value_param_pattern %n.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %i13.builtin = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %i13.builtin = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Int.ref.loc11_12: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %int_13.loc11_16: Core.IntLiteral = int_value 13 [template = constants.%int_13] -// CHECK:STDOUT: %int.make_type_signed.loc11_18: init type = call %Int.ref.loc11_12(%int_13.loc11_16) [template = constants.%i13] -// CHECK:STDOUT: %.loc11_18.1: type = value_of_initializer %int.make_type_signed.loc11_18 [template = constants.%i13] -// CHECK:STDOUT: %.loc11_18.2: type = converted %int.make_type_signed.loc11_18, %.loc11_18.1 [template = constants.%i13] +// CHECK:STDOUT: %int.make_type_signed.loc11_18: init type = call %Int.ref.loc11_12(%int_13.loc11_16) [template = constants.%i13.builtin] +// CHECK:STDOUT: %.loc11_18.1: type = value_of_initializer %int.make_type_signed.loc11_18 [template = constants.%i13.builtin] +// CHECK:STDOUT: %.loc11_18.2: type = converted %int.make_type_signed.loc11_18, %.loc11_18.1 [template = constants.%i13.builtin] // CHECK:STDOUT: %Int.ref.loc11_24: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %int_13.loc11_28: Core.IntLiteral = int_value 13 [template = constants.%int_13] -// CHECK:STDOUT: %int.make_type_signed.loc11_30: init type = call %Int.ref.loc11_24(%int_13.loc11_28) [template = constants.%i13] -// CHECK:STDOUT: %.loc11_30.1: type = value_of_initializer %int.make_type_signed.loc11_30 [template = constants.%i13] -// CHECK:STDOUT: %.loc11_30.2: type = converted %int.make_type_signed.loc11_30, %.loc11_30.1 [template = constants.%i13] -// CHECK:STDOUT: %n.param: %i13 = value_param runtime_param0 -// CHECK:STDOUT: %n: %i13 = bind_name n, %n.param -// CHECK:STDOUT: %return.param: ref %i13 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %i13 = return_slot %return.param +// CHECK:STDOUT: %int.make_type_signed.loc11_30: init type = call %Int.ref.loc11_24(%int_13.loc11_28) [template = constants.%i13.builtin] +// CHECK:STDOUT: %.loc11_30.1: type = value_of_initializer %int.make_type_signed.loc11_30 [template = constants.%i13.builtin] +// CHECK:STDOUT: %.loc11_30.2: type = converted %int.make_type_signed.loc11_30, %.loc11_30.1 [template = constants.%i13.builtin] +// CHECK:STDOUT: %n.param: %i13.builtin = value_param runtime_param0 +// CHECK:STDOUT: %n: %i13.builtin = bind_name n, %n.param +// CHECK:STDOUT: %return.param: ref %i13.builtin = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %i13.builtin = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %UseSymbolic.decl: %UseSymbolic.type = fn_decl @UseSymbolic [template = constants.%UseSymbolic] { -// CHECK:STDOUT: %n.patt: %i24 = binding_pattern n -// CHECK:STDOUT: %n.param_patt: %i24 = value_param_pattern %n.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %i24 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %i24 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %n.patt: %i24.builtin = binding_pattern n +// CHECK:STDOUT: %n.param_patt: %i24.builtin = value_param_pattern %n.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %i24.builtin = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %i24.builtin = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Int.ref.loc15_19: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %int_24.loc15_23: Core.IntLiteral = int_value 24 [template = constants.%int_24] -// CHECK:STDOUT: %int.make_type_signed.loc15_25: init type = call %Int.ref.loc15_19(%int_24.loc15_23) [template = constants.%i24] -// CHECK:STDOUT: %.loc15_25.1: type = value_of_initializer %int.make_type_signed.loc15_25 [template = constants.%i24] -// CHECK:STDOUT: %.loc15_25.2: type = converted %int.make_type_signed.loc15_25, %.loc15_25.1 [template = constants.%i24] +// CHECK:STDOUT: %int.make_type_signed.loc15_25: init type = call %Int.ref.loc15_19(%int_24.loc15_23) [template = constants.%i24.builtin] +// CHECK:STDOUT: %.loc15_25.1: type = value_of_initializer %int.make_type_signed.loc15_25 [template = constants.%i24.builtin] +// CHECK:STDOUT: %.loc15_25.2: type = converted %int.make_type_signed.loc15_25, %.loc15_25.1 [template = constants.%i24.builtin] // CHECK:STDOUT: %Int.ref.loc15_31: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %int_24.loc15_35: Core.IntLiteral = int_value 24 [template = constants.%int_24] -// CHECK:STDOUT: %int.make_type_signed.loc15_37: init type = call %Int.ref.loc15_31(%int_24.loc15_35) [template = constants.%i24] -// CHECK:STDOUT: %.loc15_37.1: type = value_of_initializer %int.make_type_signed.loc15_37 [template = constants.%i24] -// CHECK:STDOUT: %.loc15_37.2: type = converted %int.make_type_signed.loc15_37, %.loc15_37.1 [template = constants.%i24] -// CHECK:STDOUT: %n.param: %i24 = value_param runtime_param0 -// CHECK:STDOUT: %n: %i24 = bind_name n, %n.param -// CHECK:STDOUT: %return.param: ref %i24 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %i24 = return_slot %return.param +// CHECK:STDOUT: %int.make_type_signed.loc15_37: init type = call %Int.ref.loc15_31(%int_24.loc15_35) [template = constants.%i24.builtin] +// CHECK:STDOUT: %.loc15_37.1: type = value_of_initializer %int.make_type_signed.loc15_37 [template = constants.%i24.builtin] +// CHECK:STDOUT: %.loc15_37.2: type = converted %int.make_type_signed.loc15_37, %.loc15_37.1 [template = constants.%i24.builtin] +// CHECK:STDOUT: %n.param: %i24.builtin = value_param runtime_param0 +// CHECK:STDOUT: %n: %i24.builtin = bind_name n, %n.param +// CHECK:STDOUT: %return.param: ref %i24.builtin = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %i24.builtin = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int(%n.param_patt: Core.IntLiteral) -> type = "int.make_type_signed" [from "types.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @UseF(%n.param_patt: %i64) -> %i64 { +// CHECK:STDOUT: fn @UseF(%n.param_patt: %i64.builtin) -> %i64.builtin { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.3 [template = constants.%F] -// CHECK:STDOUT: %n.ref: %i64 = name_ref n, %n -// CHECK:STDOUT: %F.call: init %i64 = call %F.ref(%n.ref) -// CHECK:STDOUT: %.loc8_14.1: %i64 = value_of_initializer %F.call -// CHECK:STDOUT: %.loc8_14.2: %i64 = converted %F.call, %.loc8_14.1 +// CHECK:STDOUT: %n.ref: %i64.builtin = name_ref n, %n +// CHECK:STDOUT: %F.call: init %i64.builtin = call %F.ref(%n.ref) +// CHECK:STDOUT: %.loc8_14.1: %i64.builtin = value_of_initializer %F.call +// CHECK:STDOUT: %.loc8_14.2: %i64.builtin = converted %F.call, %.loc8_14.1 // CHECK:STDOUT: return %.loc8_14.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%n.param_patt: %i64) -> %i64 [from "use_types.carbon"]; +// CHECK:STDOUT: fn @F(%n.param_patt: %i64.builtin) -> %i64.builtin [from "use_types.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @UseG(%n.param_patt: %i13) -> %i13 { +// CHECK:STDOUT: fn @UseG(%n.param_patt: %i13.builtin) -> %i13.builtin { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %G.ref: %G.type = name_ref G, imports.%import_ref.4 [template = constants.%G] -// CHECK:STDOUT: %n.ref: %i13 = name_ref n, %n -// CHECK:STDOUT: %G.call: init %i13 = call %G.ref(%n.ref) -// CHECK:STDOUT: %.loc12_14.1: %i13 = value_of_initializer %G.call -// CHECK:STDOUT: %.loc12_14.2: %i13 = converted %G.call, %.loc12_14.1 +// CHECK:STDOUT: %n.ref: %i13.builtin = name_ref n, %n +// CHECK:STDOUT: %G.call: init %i13.builtin = call %G.ref(%n.ref) +// CHECK:STDOUT: %.loc12_14.1: %i13.builtin = value_of_initializer %G.call +// CHECK:STDOUT: %.loc12_14.2: %i13.builtin = converted %G.call, %.loc12_14.1 // CHECK:STDOUT: return %.loc12_14.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%n.param_patt: %i13) -> %i13 [from "use_types.carbon"]; +// CHECK:STDOUT: fn @G(%n.param_patt: %i13.builtin) -> %i13.builtin [from "use_types.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @UseSymbolic(%n.param_patt: %i24) -> %i24 { +// CHECK:STDOUT: fn @UseSymbolic(%n.param_patt: %i24.builtin) -> %i24.builtin { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Symbolic.ref: %Symbolic.type = name_ref Symbolic, imports.%import_ref.5 [template = constants.%Symbolic] // CHECK:STDOUT: %int_24.loc16: Core.IntLiteral = int_value 24 [template = constants.%int_24] -// CHECK:STDOUT: %n.ref: %i24 = name_ref n, %n +// CHECK:STDOUT: %n.ref: %i24.builtin = name_ref n, %n // CHECK:STDOUT: %Symbolic.specific_fn: = specific_function %Symbolic.ref, @Symbolic(constants.%int_24) [template = constants.%Symbolic.specific_fn] -// CHECK:STDOUT: %Symbolic.call: init %i24 = call %Symbolic.specific_fn(%n.ref) -// CHECK:STDOUT: %.loc16_25.1: %i24 = value_of_initializer %Symbolic.call -// CHECK:STDOUT: %.loc16_25.2: %i24 = converted %Symbolic.call, %.loc16_25.1 +// CHECK:STDOUT: %Symbolic.call: init %i24.builtin = call %Symbolic.specific_fn(%n.ref) +// CHECK:STDOUT: %.loc16_25.1: %i24.builtin = value_of_initializer %Symbolic.call +// CHECK:STDOUT: %.loc16_25.2: %i24.builtin = converted %Symbolic.call, %.loc16_25.1 // CHECK:STDOUT: return %.loc16_25.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Symbolic(constants.%N: Core.IntLiteral) [from "use_types.carbon"] { // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)] // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)] -// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic = %iN (constants.%iN)] +// CHECK:STDOUT: %iN.builtin: type = int_type signed, %N [symbolic = %iN.builtin (constants.%iN.builtin)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type @Symbolic.%iN (%iN) [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type @Symbolic.%iN.builtin (%iN.builtin) [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%N.param_patt: Core.IntLiteral, %x.param_patt: @Symbolic.%iN (%iN)) -> @Symbolic.%iN (%iN); +// CHECK:STDOUT: fn(%N.param_patt: Core.IntLiteral, %x.param_patt: @Symbolic.%iN.builtin (%iN.builtin)) -> @Symbolic.%iN.builtin (%iN.builtin); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Symbolic(constants.%N) { // CHECK:STDOUT: %N => constants.%N // CHECK:STDOUT: %N.patt => constants.%N -// CHECK:STDOUT: %iN => constants.%iN +// CHECK:STDOUT: %iN.builtin => constants.%iN.builtin // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Symbolic(constants.%int_24) { // CHECK:STDOUT: %N => constants.%int_24 // CHECK:STDOUT: %N.patt => constants.%int_24 -// CHECK:STDOUT: %iN => constants.%i24 +// CHECK:STDOUT: %iN.builtin => constants.%i24.builtin // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type @@ -520,28 +520,26 @@ var m: Int(1000000000); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %Int.type.1: type = fn_type @Int.1 [template] -// CHECK:STDOUT: %Int.1: %Int.type.1 = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] -// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] -// CHECK:STDOUT: %Int.type.2: type = fn_type @Int.2 [template] +// CHECK:STDOUT: %i32: type = class_type @Int.2, @Int.2(%int_32) [template] +// CHECK:STDOUT: %Negate.type.1: type = fn_type @Negate.1 [template] +// CHECK:STDOUT: %Negate: %Negate.type.1 = struct_value () [template] +// CHECK:STDOUT: %Int.type.2: type = fn_type @Int.1 [template] // CHECK:STDOUT: %Int.2: %Int.type.2 = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_-1.1: %i32 = int_value -1 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_-1.1, %Convert.15 [template] -// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_-1.1, %Convert.11 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.3(%int_32) [template] // CHECK:STDOUT: %int_-1.2: Core.IntLiteral = int_value -1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -550,7 +548,7 @@ var m: Int(1000000000); // CHECK:STDOUT: %import_ref.2: %Int.type.2 = import_ref Main//types, Int, loaded [template = constants.%Int.2] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.3 -// CHECK:STDOUT: .ImplicitAs = %import_ref.4 +// CHECK:STDOUT: .ImplicitAs = %import_ref.7 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -566,38 +564,34 @@ var m: Int(1000000000); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %Negate.decl: %Negate.type.1 = fn_decl @Negate.1 [template = constants.%Negate] { // CHECK:STDOUT: %n.patt: %i32 = binding_pattern n // CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_14: init type = call constants.%Int.1(%int_32.loc6_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_signed.loc6_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_signed.loc6_14, %.loc6_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6_14: type = class_type @Int.2, @Int.2(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc6_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_22: init type = call constants.%Int.1(%int_32.loc6_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int.make_type_signed.loc6_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.2: type = converted %int.make_type_signed.loc6_22, %.loc6_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6_22: type = class_type @Int.2, @Int.2(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %Int.ref: %Int.type.2 = name_ref Int, imports.%import_ref.2 [template = constants.%Int.2] -// CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref: %Negate.type.1 = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc12_19: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_19: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_19: = bound_method %int_1, %impl.elem0.loc12_19 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc12_19: = specific_function %Convert.bound.loc12_19, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc12_19: init %i32 = call %Convert.specific_fn.loc12_19(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc12_19.1: %i32 = value_of_initializer %int.convert_checked.loc12_19 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc12_19.2: %i32 = converted %int_1, %.loc12_19.1 [template = constants.%int_1.2] // CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc12_19.2) [template = constants.%int_-1.1] -// CHECK:STDOUT: %impl.elem0.loc12_20: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %impl.elem0.loc12_20: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc12_20: = bound_method %int.snegate, %impl.elem0.loc12_20 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc12_20: = specific_function %Convert.bound.loc12_20, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %Convert.specific_fn.loc12_20: = specific_function %Convert.bound.loc12_20, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %.loc12_20.1: %i32 = value_of_initializer %int.snegate [template = constants.%int_-1.1] // CHECK:STDOUT: %.loc12_20.2: %i32 = converted %int.snegate, %.loc12_20.1 [template = constants.%int_-1.1] // CHECK:STDOUT: %int.convert_checked.loc12_20: init Core.IntLiteral = call %Convert.specific_fn.loc12_20(%.loc12_20.2) [template = constants.%int_-1.2] @@ -610,9 +604,9 @@ var m: Int(1000000000); // CHECK:STDOUT: %n: ref = bind_name n, %n.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Negate(%n.param_patt: %i32) -> %i32 = "int.snegate"; +// CHECK:STDOUT: fn @Negate.1(%n.param_patt: %i32) -> %i32 = "int.snegate"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Int.2(%n.param_patt: Core.IntLiteral) -> type = "int.make_type_signed" [from "types.carbon"]; +// CHECK:STDOUT: fn @Int.1(%n.param_patt: Core.IntLiteral) -> type = "int.make_type_signed" [from "types.carbon"]; // CHECK:STDOUT: // CHECK:STDOUT: --- fail_oversized.carbon // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon b/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon index 71f18dc5f50e..aba3e03aec4c 100644 --- a/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon +++ b/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon @@ -127,21 +127,21 @@ var m: UInt(1000000000); // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %u64: type = int_type unsigned, %int_64 [template] +// CHECK:STDOUT: %u64.builtin: type = int_type unsigned, %int_64 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %int_13: Core.IntLiteral = int_value 13 [template] -// CHECK:STDOUT: %u13: type = int_type unsigned, %int_13 [template] +// CHECK:STDOUT: %u13.builtin: type = int_type unsigned, %int_13 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [template] // CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [template] // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic] -// CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic] +// CHECK:STDOUT: %uN.builtin: type = int_type unsigned, %N [symbolic] // CHECK:STDOUT: %Symbolic.type: type = fn_type @Symbolic [template] // CHECK:STDOUT: %Symbolic: %Symbolic.type = struct_value () [template] -// CHECK:STDOUT: %require_complete: = require_complete_type %uN [symbolic] +// CHECK:STDOUT: %require_complete: = require_complete_type %uN.builtin [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -165,54 +165,54 @@ var m: UInt(1000000000); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %n.patt: %u64 = binding_pattern n -// CHECK:STDOUT: %n.param_patt: %u64 = value_param_pattern %n.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %u64 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %u64 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %n.patt: %u64.builtin = binding_pattern n +// CHECK:STDOUT: %n.param_patt: %u64.builtin = value_param_pattern %n.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %u64.builtin = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %u64.builtin = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %UInt.ref.loc6_9: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] // CHECK:STDOUT: %int_64.loc6_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %int.make_type_unsigned.loc6_16: init type = call %UInt.ref.loc6_9(%int_64.loc6_14) [template = constants.%u64] -// CHECK:STDOUT: %.loc6_16.1: type = value_of_initializer %int.make_type_unsigned.loc6_16 [template = constants.%u64] -// CHECK:STDOUT: %.loc6_16.2: type = converted %int.make_type_unsigned.loc6_16, %.loc6_16.1 [template = constants.%u64] +// CHECK:STDOUT: %int.make_type_unsigned.loc6_16: init type = call %UInt.ref.loc6_9(%int_64.loc6_14) [template = constants.%u64.builtin] +// CHECK:STDOUT: %.loc6_16.1: type = value_of_initializer %int.make_type_unsigned.loc6_16 [template = constants.%u64.builtin] +// CHECK:STDOUT: %.loc6_16.2: type = converted %int.make_type_unsigned.loc6_16, %.loc6_16.1 [template = constants.%u64.builtin] // CHECK:STDOUT: %UInt.ref.loc6_22: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] // CHECK:STDOUT: %int_64.loc6_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %int.make_type_unsigned.loc6_29: init type = call %UInt.ref.loc6_22(%int_64.loc6_27) [template = constants.%u64] -// CHECK:STDOUT: %.loc6_29.1: type = value_of_initializer %int.make_type_unsigned.loc6_29 [template = constants.%u64] -// CHECK:STDOUT: %.loc6_29.2: type = converted %int.make_type_unsigned.loc6_29, %.loc6_29.1 [template = constants.%u64] -// CHECK:STDOUT: %n.param: %u64 = value_param runtime_param0 -// CHECK:STDOUT: %n: %u64 = bind_name n, %n.param -// CHECK:STDOUT: %return.param: ref %u64 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %u64 = return_slot %return.param +// CHECK:STDOUT: %int.make_type_unsigned.loc6_29: init type = call %UInt.ref.loc6_22(%int_64.loc6_27) [template = constants.%u64.builtin] +// CHECK:STDOUT: %.loc6_29.1: type = value_of_initializer %int.make_type_unsigned.loc6_29 [template = constants.%u64.builtin] +// CHECK:STDOUT: %.loc6_29.2: type = converted %int.make_type_unsigned.loc6_29, %.loc6_29.1 [template = constants.%u64.builtin] +// CHECK:STDOUT: %n.param: %u64.builtin = value_param runtime_param0 +// CHECK:STDOUT: %n: %u64.builtin = bind_name n, %n.param +// CHECK:STDOUT: %return.param: ref %u64.builtin = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %u64.builtin = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %n.patt: %u13 = binding_pattern n -// CHECK:STDOUT: %n.param_patt: %u13 = value_param_pattern %n.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %u13 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %u13 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %n.patt: %u13.builtin = binding_pattern n +// CHECK:STDOUT: %n.param_patt: %u13.builtin = value_param_pattern %n.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %u13.builtin = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %u13.builtin = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %UInt.ref.loc10_9: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] // CHECK:STDOUT: %int_13.loc10_14: Core.IntLiteral = int_value 13 [template = constants.%int_13] -// CHECK:STDOUT: %int.make_type_unsigned.loc10_16: init type = call %UInt.ref.loc10_9(%int_13.loc10_14) [template = constants.%u13] -// CHECK:STDOUT: %.loc10_16.1: type = value_of_initializer %int.make_type_unsigned.loc10_16 [template = constants.%u13] -// CHECK:STDOUT: %.loc10_16.2: type = converted %int.make_type_unsigned.loc10_16, %.loc10_16.1 [template = constants.%u13] +// CHECK:STDOUT: %int.make_type_unsigned.loc10_16: init type = call %UInt.ref.loc10_9(%int_13.loc10_14) [template = constants.%u13.builtin] +// CHECK:STDOUT: %.loc10_16.1: type = value_of_initializer %int.make_type_unsigned.loc10_16 [template = constants.%u13.builtin] +// CHECK:STDOUT: %.loc10_16.2: type = converted %int.make_type_unsigned.loc10_16, %.loc10_16.1 [template = constants.%u13.builtin] // CHECK:STDOUT: %UInt.ref.loc10_22: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] // CHECK:STDOUT: %int_13.loc10_27: Core.IntLiteral = int_value 13 [template = constants.%int_13] -// CHECK:STDOUT: %int.make_type_unsigned.loc10_29: init type = call %UInt.ref.loc10_22(%int_13.loc10_27) [template = constants.%u13] -// CHECK:STDOUT: %.loc10_29.1: type = value_of_initializer %int.make_type_unsigned.loc10_29 [template = constants.%u13] -// CHECK:STDOUT: %.loc10_29.2: type = converted %int.make_type_unsigned.loc10_29, %.loc10_29.1 [template = constants.%u13] -// CHECK:STDOUT: %n.param: %u13 = value_param runtime_param0 -// CHECK:STDOUT: %n: %u13 = bind_name n, %n.param -// CHECK:STDOUT: %return.param: ref %u13 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %u13 = return_slot %return.param +// CHECK:STDOUT: %int.make_type_unsigned.loc10_29: init type = call %UInt.ref.loc10_22(%int_13.loc10_27) [template = constants.%u13.builtin] +// CHECK:STDOUT: %.loc10_29.1: type = value_of_initializer %int.make_type_unsigned.loc10_29 [template = constants.%u13.builtin] +// CHECK:STDOUT: %.loc10_29.2: type = converted %int.make_type_unsigned.loc10_29, %.loc10_29.1 [template = constants.%u13.builtin] +// CHECK:STDOUT: %n.param: %u13.builtin = value_param runtime_param0 +// CHECK:STDOUT: %n: %u13.builtin = bind_name n, %n.param +// CHECK:STDOUT: %return.param: ref %u13.builtin = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %u13.builtin = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %Symbolic.decl: %Symbolic.type = fn_decl @Symbolic [template = constants.%Symbolic] { // CHECK:STDOUT: %N.patt.loc14_13.1: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc14_13.2 (constants.%N.patt)] // CHECK:STDOUT: %N.param_patt: Core.IntLiteral = value_param_pattern %N.patt.loc14_13.1, runtime_param [symbolic = %N.patt.loc14_13.2 (constants.%N.patt)] -// CHECK:STDOUT: %x.patt: @Symbolic.%uN (%uN) = binding_pattern x -// CHECK:STDOUT: %x.param_patt: @Symbolic.%uN (%uN) = value_param_pattern %x.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: @Symbolic.%uN (%uN) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @Symbolic.%uN (%uN) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %x.patt: @Symbolic.%uN.builtin (%uN.builtin) = binding_pattern x +// CHECK:STDOUT: %x.param_patt: @Symbolic.%uN.builtin (%uN.builtin) = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @Symbolic.%uN.builtin (%uN.builtin) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @Symbolic.%uN.builtin (%uN.builtin) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] @@ -220,34 +220,34 @@ var m: UInt(1000000000); // CHECK:STDOUT: %.loc14_28.2: type = converted %int_literal.make_type, %.loc14_28.1 [template = Core.IntLiteral] // CHECK:STDOUT: %UInt.ref.loc14_34: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] // CHECK:STDOUT: %N.ref.loc14_39: Core.IntLiteral = name_ref N, %N.loc14_13.1 [symbolic = %N.loc14_13.2 (constants.%N)] -// CHECK:STDOUT: %int.make_type_unsigned.loc14_40: init type = call %UInt.ref.loc14_34(%N.ref.loc14_39) [symbolic = %uN (constants.%uN)] -// CHECK:STDOUT: %.loc14_40.1: type = value_of_initializer %int.make_type_unsigned.loc14_40 [symbolic = %uN (constants.%uN)] -// CHECK:STDOUT: %.loc14_40.2: type = converted %int.make_type_unsigned.loc14_40, %.loc14_40.1 [symbolic = %uN (constants.%uN)] +// CHECK:STDOUT: %int.make_type_unsigned.loc14_40: init type = call %UInt.ref.loc14_34(%N.ref.loc14_39) [symbolic = %uN.builtin (constants.%uN.builtin)] +// CHECK:STDOUT: %.loc14_40.1: type = value_of_initializer %int.make_type_unsigned.loc14_40 [symbolic = %uN.builtin (constants.%uN.builtin)] +// CHECK:STDOUT: %.loc14_40.2: type = converted %int.make_type_unsigned.loc14_40, %.loc14_40.1 [symbolic = %uN.builtin (constants.%uN.builtin)] // CHECK:STDOUT: %UInt.ref.loc14_46: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] // CHECK:STDOUT: %N.ref.loc14_51: Core.IntLiteral = name_ref N, %N.loc14_13.1 [symbolic = %N.loc14_13.2 (constants.%N)] -// CHECK:STDOUT: %int.make_type_unsigned.loc14_52: init type = call %UInt.ref.loc14_46(%N.ref.loc14_51) [symbolic = %uN (constants.%uN)] -// CHECK:STDOUT: %.loc14_52.1: type = value_of_initializer %int.make_type_unsigned.loc14_52 [symbolic = %uN (constants.%uN)] -// CHECK:STDOUT: %.loc14_52.2: type = converted %int.make_type_unsigned.loc14_52, %.loc14_52.1 [symbolic = %uN (constants.%uN)] +// CHECK:STDOUT: %int.make_type_unsigned.loc14_52: init type = call %UInt.ref.loc14_46(%N.ref.loc14_51) [symbolic = %uN.builtin (constants.%uN.builtin)] +// CHECK:STDOUT: %.loc14_52.1: type = value_of_initializer %int.make_type_unsigned.loc14_52 [symbolic = %uN.builtin (constants.%uN.builtin)] +// CHECK:STDOUT: %.loc14_52.2: type = converted %int.make_type_unsigned.loc14_52, %.loc14_52.1 [symbolic = %uN.builtin (constants.%uN.builtin)] // CHECK:STDOUT: %N.param: Core.IntLiteral = value_param runtime_param // CHECK:STDOUT: %N.loc14_13.1: Core.IntLiteral = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc14_13.2 (constants.%N)] -// CHECK:STDOUT: %x.param: @Symbolic.%uN (%uN) = value_param runtime_param0 -// CHECK:STDOUT: %x: @Symbolic.%uN (%uN) = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref @Symbolic.%uN (%uN) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @Symbolic.%uN (%uN) = return_slot %return.param +// CHECK:STDOUT: %x.param: @Symbolic.%uN.builtin (%uN.builtin) = value_param runtime_param0 +// CHECK:STDOUT: %x: @Symbolic.%uN.builtin (%uN.builtin) = bind_name x, %x.param +// CHECK:STDOUT: %return.param: ref @Symbolic.%uN.builtin (%uN.builtin) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @Symbolic.%uN.builtin (%uN.builtin) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @UInt(%n.param_patt: Core.IntLiteral) -> type = "int.make_type_unsigned" [from "types.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F(%n.param_patt: %u64) -> %u64 { +// CHECK:STDOUT: fn @F(%n.param_patt: %u64.builtin) -> %u64.builtin { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %n.ref: %u64 = name_ref n, %n +// CHECK:STDOUT: %n.ref: %u64.builtin = name_ref n, %n // CHECK:STDOUT: return %n.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%n.param_patt: %u13) -> %u13 { +// CHECK:STDOUT: fn @G(%n.param_patt: %u13.builtin) -> %u13.builtin { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %n.ref: %u13 = name_ref n, %n +// CHECK:STDOUT: %n.ref: %u13.builtin = name_ref n, %n // CHECK:STDOUT: return %n.ref // CHECK:STDOUT: } // CHECK:STDOUT: @@ -256,14 +256,14 @@ var m: UInt(1000000000); // CHECK:STDOUT: generic fn @Symbolic(%N.loc14_13.1: Core.IntLiteral) { // CHECK:STDOUT: %N.loc14_13.2: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N.loc14_13.2 (constants.%N)] // CHECK:STDOUT: %N.patt.loc14_13.2: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc14_13.2 (constants.%N.patt)] -// CHECK:STDOUT: %uN: type = int_type unsigned, %N.loc14_13.2 [symbolic = %uN (constants.%uN)] +// CHECK:STDOUT: %uN.builtin: type = int_type unsigned, %N.loc14_13.2 [symbolic = %uN.builtin (constants.%uN.builtin)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type @Symbolic.%uN (%uN) [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type @Symbolic.%uN.builtin (%uN.builtin) [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%N.param_patt: Core.IntLiteral, %x.param_patt: @Symbolic.%uN (%uN)) -> @Symbolic.%uN (%uN) { +// CHECK:STDOUT: fn(%N.param_patt: Core.IntLiteral, %x.param_patt: @Symbolic.%uN.builtin (%uN.builtin)) -> @Symbolic.%uN.builtin (%uN.builtin) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @Symbolic.%uN (%uN) = name_ref x, %x +// CHECK:STDOUT: %x.ref: @Symbolic.%uN.builtin (%uN.builtin) = name_ref x, %x // CHECK:STDOUT: return %x.ref // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -271,7 +271,7 @@ var m: UInt(1000000000); // CHECK:STDOUT: specific @Symbolic(constants.%N) { // CHECK:STDOUT: %N.loc14_13.2 => constants.%N // CHECK:STDOUT: %N.patt.loc14_13.2 => constants.%N -// CHECK:STDOUT: %uN => constants.%uN +// CHECK:STDOUT: %uN.builtin => constants.%uN.builtin // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_zero_size.carbon @@ -315,28 +315,26 @@ var m: UInt(1000000000); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Negate.type.1: type = fn_type @Negate.1 [template] +// CHECK:STDOUT: %Negate: %Negate.type.1 = struct_value () [template] // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_-1.1: %i32 = int_value -1 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_-1.1, %Convert.15 [template] -// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_-1.1, %Convert.11 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.3(%int_32) [template] // CHECK:STDOUT: %int_-1.2: Core.IntLiteral = int_value -1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -345,7 +343,7 @@ var m: UInt(1000000000); // CHECK:STDOUT: %import_ref.2: %UInt.type = import_ref Main//types, UInt, loaded [template = constants.%UInt] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.3 -// CHECK:STDOUT: .ImplicitAs = %import_ref.4 +// CHECK:STDOUT: .ImplicitAs = %import_ref.7 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -361,38 +359,34 @@ var m: UInt(1000000000); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %Negate.decl: %Negate.type.1 = fn_decl @Negate.1 [template = constants.%Negate] { // CHECK:STDOUT: %n.patt: %i32 = binding_pattern n // CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_14: init type = call constants.%Int(%int_32.loc6_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_signed.loc6_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_signed.loc6_14, %.loc6_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc6_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_22: init type = call constants.%Int(%int_32.loc6_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int.make_type_signed.loc6_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.2: type = converted %int.make_type_signed.loc6_22, %.loc6_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %UInt.ref: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] -// CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref: %Negate.type.1 = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc12_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_20: = bound_method %int_1, %impl.elem0.loc12_20 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc12_20: = specific_function %Convert.bound.loc12_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc12_20: init %i32 = call %Convert.specific_fn.loc12_20(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc12_20.1: %i32 = value_of_initializer %int.convert_checked.loc12_20 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc12_20.2: %i32 = converted %int_1, %.loc12_20.1 [template = constants.%int_1.2] // CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc12_20.2) [template = constants.%int_-1.1] -// CHECK:STDOUT: %impl.elem0.loc12_21: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %impl.elem0.loc12_21: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc12_21: = bound_method %int.snegate, %impl.elem0.loc12_21 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc12_21: = specific_function %Convert.bound.loc12_21, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %Convert.specific_fn.loc12_21: = specific_function %Convert.bound.loc12_21, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %.loc12_21.1: %i32 = value_of_initializer %int.snegate [template = constants.%int_-1.1] // CHECK:STDOUT: %.loc12_21.2: %i32 = converted %int.snegate, %.loc12_21.1 [template = constants.%int_-1.1] // CHECK:STDOUT: %int.convert_checked.loc12_21: init Core.IntLiteral = call %Convert.specific_fn.loc12_21(%.loc12_21.2) [template = constants.%int_-1.2] @@ -405,7 +399,7 @@ var m: UInt(1000000000); // CHECK:STDOUT: %n: ref = bind_name n, %n.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Negate(%n.param_patt: %i32) -> %i32 = "int.snegate"; +// CHECK:STDOUT: fn @Negate.1(%n.param_patt: %i32) -> %i32 = "int.snegate"; // CHECK:STDOUT: // CHECK:STDOUT: fn @UInt(%n.param_patt: Core.IntLiteral) -> type = "int.make_type_unsigned" [from "types.carbon"]; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/int/neq.carbon b/toolchain/check/testdata/builtins/int/neq.carbon index 61fde3f19eb2..d189bd30ca35 100644 --- a/toolchain/check/testdata/builtins/int/neq.carbon +++ b/toolchain/check/testdata/builtins/int/neq.carbon @@ -28,30 +28,28 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Neq.type: type = fn_type @Neq [template] // CHECK:STDOUT: %Neq: %Neq.type = struct_value () [template] // CHECK:STDOUT: %True: type = class_type @True [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %False: type = class_type @False [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %false: bool = bool_literal false [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %true: bool = bool_literal true [template] @@ -62,8 +60,8 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .Bool = %import_ref.2 -// CHECK:STDOUT: .ImplicitAs = %import_ref.3 +// CHECK:STDOUT: .Bool = %import_ref.5 +// CHECK:STDOUT: .ImplicitAs = %import_ref.6 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -88,13 +86,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%int_32.loc2_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_signed.loc2_11, %.loc2_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%int_32.loc2_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_signed.loc2_19, %.loc2_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_27.2: type = converted %bool.make_type, %.loc2_27.1 [template = bool] @@ -129,13 +123,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc12_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc12_19: init type = call constants.%Int(%int_32.loc12_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_19.1: type = value_of_initializer %int.make_type_signed.loc12_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_19.2: type = converted %int.make_type_signed.loc12_19, %.loc12_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc12_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc12_27: init type = call constants.%Int(%int_32.loc12_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_27.1: type = value_of_initializer %int.make_type_signed.loc12_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_27.2: type = converted %int.make_type_signed.loc12_27, %.loc12_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc12_35.2: type = converted %bool.make_type, %.loc12_35.1 [template = bool] @@ -149,7 +139,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @True { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%True @@ -157,7 +147,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @False { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%False @@ -172,13 +162,13 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %Neq.ref.loc8: %Neq.type = name_ref Neq, file.%Neq.decl [template = constants.%Neq] // CHECK:STDOUT: %int_1.loc8_21: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_1.loc8_24: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc8_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc8_21: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc8_21: = bound_method %int_1.loc8_21, %impl.elem0.loc8_21 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc8_21: = specific_function %Convert.bound.loc8_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc8_21: init %i32 = call %Convert.specific_fn.loc8_21(%int_1.loc8_21) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc8_21.1: %i32 = value_of_initializer %int.convert_checked.loc8_21 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc8_21.2: %i32 = converted %int_1.loc8_21, %.loc8_21.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc8_24: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc8_24: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc8_24: = bound_method %int_1.loc8_24, %impl.elem0.loc8_24 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc8_24: = specific_function %Convert.bound.loc8_24, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc8_24: init %i32 = call %Convert.specific_fn.loc8_24(%int_1.loc8_24) [template = constants.%int_1.2] @@ -203,13 +193,13 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %Neq.ref.loc9: %Neq.type = name_ref Neq, file.%Neq.decl [template = constants.%Neq] // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc9_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_20: = bound_method %int_1.loc9, %impl.elem0.loc9_20 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc9_20: = specific_function %Convert.bound.loc9_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc9_20: init %i32 = call %Convert.specific_fn.loc9_20(%int_1.loc9) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc9_20.1: %i32 = value_of_initializer %int.convert_checked.loc9_20 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc9_20.2: %i32 = converted %int_1.loc9, %.loc9_20.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc9_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_23: = bound_method %int_2, %impl.elem0.loc9_23 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc9_23: = specific_function %Convert.bound.loc9_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc9_23: init %i32 = call %Convert.specific_fn.loc9_23(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/builtins/int/or.carbon b/toolchain/check/testdata/builtins/int/or.carbon index 53e4214bdf2f..760ead62a98e 100644 --- a/toolchain/check/testdata/builtins/int/or.carbon +++ b/toolchain/check/testdata/builtins/int/or.carbon @@ -23,30 +23,28 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Or.type: type = fn_type @Or [template] // CHECK:STDOUT: %Or: %Or.type = struct_value () [template] // CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: %int_10.1: Core.IntLiteral = int_value 10 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_10.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_10.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_10.2: %i32 = int_value 10 [template] // CHECK:STDOUT: %int_14.1: %i32 = int_value 14 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_14.1, %Convert.15 [template] -// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_14.1, %Convert.11 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.3(%int_32) [template] // CHECK:STDOUT: %int_14.2: Core.IntLiteral = int_value 14 [template] // CHECK:STDOUT: %array_type: type = array_type %int_14.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -57,7 +55,7 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -81,17 +79,11 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc2_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_10: init type = call constants.%Int(%int_32.loc2_10) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_10.1: type = value_of_initializer %int.make_type_signed.loc2_10 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_10.2: type = converted %int.make_type_signed.loc2_10, %.loc2_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_18: init type = call constants.%Int(%int_32.loc2_18) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_18.1: type = value_of_initializer %int.make_type_signed.loc2_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_18.2: type = converted %int.make_type_signed.loc2_18, %.loc2_18.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_26: init type = call constants.%Int(%int_32.loc2_26) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_26.1: type = value_of_initializer %int.make_type_signed.loc2_26 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_26.2: type = converted %int.make_type_signed.loc2_26, %.loc2_26.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -100,28 +92,26 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // 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: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %Or.ref: %Or.type = name_ref Or, %Or.decl [template = constants.%Or] // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [template = constants.%int_10.1] -// CHECK:STDOUT: %impl.elem0.loc4_19: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_19: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_19: = bound_method %int_12, %impl.elem0.loc4_19 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc4_19: = specific_function %Convert.bound.loc4_19, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc4_19: init %i32 = call %Convert.specific_fn.loc4_19(%int_12) [template = constants.%int_12.2] // CHECK:STDOUT: %.loc4_19.1: %i32 = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%int_12.2] // CHECK:STDOUT: %.loc4_19.2: %i32 = converted %int_12, %.loc4_19.1 [template = constants.%int_12.2] -// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_10, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_10) [template = constants.%int_10.2] // CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_10.2] // CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_10, %.loc4_23.1 [template = constants.%int_10.2] // CHECK:STDOUT: %int.or: init %i32 = call %Or.ref(%.loc4_19.2, %.loc4_23.2) [template = constants.%int_14.1] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc4_25: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %impl.elem0.loc4_25: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc4_25: = bound_method %int.or, %impl.elem0.loc4_25 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_25: = specific_function %Convert.bound.loc4_25, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_25: = specific_function %Convert.bound.loc4_25, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %.loc4_25.1: %i32 = value_of_initializer %int.or [template = constants.%int_14.1] // CHECK:STDOUT: %.loc4_25.2: %i32 = converted %int.or, %.loc4_25.1 [template = constants.%int_14.1] // CHECK:STDOUT: %int.convert_checked.loc4_25: init Core.IntLiteral = call %Convert.specific_fn.loc4_25(%.loc4_25.2) [template = constants.%int_14.2] @@ -131,10 +121,8 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var // 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: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_14: Core.IntLiteral = int_value 14 [template = constants.%int_14.2] -// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc5: type = array_type %int_14, %i32 [template = constants.%array_type] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -146,17 +134,11 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 diff --git a/toolchain/check/testdata/builtins/int/right_shift.carbon b/toolchain/check/testdata/builtins/int/right_shift.carbon index b2b06e1c04e5..654ed666db69 100644 --- a/toolchain/check/testdata/builtins/int/right_shift.carbon +++ b/toolchain/check/testdata/builtins/int/right_shift.carbon @@ -68,30 +68,28 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %RightShift.type: type = fn_type @RightShift [template] -// CHECK:STDOUT: %RightShift: %RightShift.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %RightShift.type.1: type = fn_type @RightShift.1 [template] +// CHECK:STDOUT: %RightShift: %RightShift.type.1 = struct_value () [template] // CHECK:STDOUT: %int_22.1: Core.IntLiteral = int_value 22 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_22.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_22.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_22.2: %i32 = int_value 22 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %int_5.1: %i32 = int_value 5 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_5.1, %Convert.15 [template] -// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_5.1, %Convert.11 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.3(%int_32) [template] // CHECK:STDOUT: %int_5.2: Core.IntLiteral = int_value 5 [template] // CHECK:STDOUT: %array_type: type = array_type %int_5.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -102,7 +100,7 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -117,7 +115,7 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %RightShift.decl: %RightShift.type = fn_decl @RightShift [template = constants.%RightShift] { +// CHECK:STDOUT: %RightShift.decl: %RightShift.type.1 = fn_decl @RightShift.1 [template = constants.%RightShift] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -126,17 +124,11 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc2_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_18: init type = call constants.%Int(%int_32.loc2_18) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_18.1: type = value_of_initializer %int.make_type_signed.loc2_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_18.2: type = converted %int.make_type_signed.loc2_18, %.loc2_18.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_26: init type = call constants.%Int(%int_32.loc2_26) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_26.1: type = value_of_initializer %int.make_type_signed.loc2_26 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_26.2: type = converted %int.make_type_signed.loc2_26, %.loc2_26.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_34: init type = call constants.%Int(%int_32.loc2_34) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_34.1: type = value_of_initializer %int.make_type_signed.loc2_34 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_34.2: type = converted %int.make_type_signed.loc2_34, %.loc2_34.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -145,28 +137,26 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // 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: %RightShift.ref: %RightShift.type = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] +// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %RightShift.ref: %RightShift.type.1 = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] // CHECK:STDOUT: %int_22: Core.IntLiteral = int_value 22 [template = constants.%int_22.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc4_27: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_27: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_27: = bound_method %int_22, %impl.elem0.loc4_27 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc4_27: = specific_function %Convert.bound.loc4_27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc4_27: init %i32 = call %Convert.specific_fn.loc4_27(%int_22) [template = constants.%int_22.2] // CHECK:STDOUT: %.loc4_27.1: %i32 = value_of_initializer %int.convert_checked.loc4_27 [template = constants.%int_22.2] // CHECK:STDOUT: %.loc4_27.2: %i32 = converted %int_22, %.loc4_27.1 [template = constants.%int_22.2] -// CHECK:STDOUT: %impl.elem0.loc4_31: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_31: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_31: = bound_method %int_2, %impl.elem0.loc4_31 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc4_31: = specific_function %Convert.bound.loc4_31, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc4_31: init %i32 = call %Convert.specific_fn.loc4_31(%int_2) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc4_31.1: %i32 = value_of_initializer %int.convert_checked.loc4_31 [template = constants.%int_2.2] // CHECK:STDOUT: %.loc4_31.2: %i32 = converted %int_2, %.loc4_31.1 [template = constants.%int_2.2] // CHECK:STDOUT: %int.right_shift: init %i32 = call %RightShift.ref(%.loc4_27.2, %.loc4_31.2) [template = constants.%int_5.1] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc4_32: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %impl.elem0.loc4_32: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc4_32: = bound_method %int.right_shift, %impl.elem0.loc4_32 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_32: = specific_function %Convert.bound.loc4_32, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_32: = specific_function %Convert.bound.loc4_32, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %.loc4_32.1: %i32 = value_of_initializer %int.right_shift [template = constants.%int_5.1] // CHECK:STDOUT: %.loc4_32.2: %i32 = converted %int.right_shift, %.loc4_32.1 [template = constants.%int_5.1] // CHECK:STDOUT: %int.convert_checked.loc4_32: init Core.IntLiteral = call %Convert.specific_fn.loc4_32(%.loc4_32.2) [template = constants.%int_5.2] @@ -176,10 +166,8 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var // 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: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.2] -// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc5: type = array_type %int_5, %i32 [template = constants.%array_type] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -191,17 +179,11 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -211,11 +193,11 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @RightShift(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.right_shift"; +// CHECK:STDOUT: fn @RightShift.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.right_shift"; // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %RightShift.ref: %RightShift.type = name_ref RightShift, file.%RightShift.decl [template = constants.%RightShift] +// CHECK:STDOUT: %RightShift.ref: %RightShift.type.1 = name_ref RightShift, file.%RightShift.decl [template = constants.%RightShift] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.right_shift: init %i32 = call %RightShift.ref(%a.ref, %b.ref) @@ -236,43 +218,41 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %RightShift.type: type = fn_type @RightShift [template] -// CHECK:STDOUT: %RightShift: %RightShift.type = struct_value () [template] -// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %RightShift.type.1: type = fn_type @RightShift.1 [template] +// CHECK:STDOUT: %RightShift: %RightShift.type.1 = struct_value () [template] +// CHECK:STDOUT: %Negate.type.1: type = fn_type @Negate.1 [template] +// CHECK:STDOUT: %Negate: %Negate.type.1 = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_-1: %i32 = int_value -1 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.2, %Convert.15 [template] -// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.2, %Convert.11 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.3(%int_32) [template] // CHECK:STDOUT: %array_type.1: type = array_type %int_1.1, %i32 [template] // CHECK:STDOUT: %ptr.1: type = ptr_type %array_type.1 [template] // CHECK:STDOUT: %int_10.1: Core.IntLiteral = int_value 10 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_10.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_10.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_10.2: %i32 = int_value 10 [template] // CHECK:STDOUT: %int_-10: %i32 = int_value -10 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %int_-3: %i32 = int_value -3 [template] // CHECK:STDOUT: %int_3.1: %i32 = int_value 3 [template] -// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_3.1, %Convert.15 [template] -// CHECK:STDOUT: %Convert.specific_fn.5: = specific_function %Convert.bound.5, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_3.1, %Convert.11 [template] +// CHECK:STDOUT: %Convert.specific_fn.5: = specific_function %Convert.bound.5, @Convert.3(%int_32) [template] // CHECK:STDOUT: %int_3.2: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %array_type.2: type = array_type %int_3.2, %i32 [template] // CHECK:STDOUT: %ptr.2: type = ptr_type %array_type.2 [template] @@ -281,7 +261,7 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -298,7 +278,7 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: .arr2_p = @__global_init.%arr2_p // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %RightShift.decl: %RightShift.type = fn_decl @RightShift [template = constants.%RightShift] { +// CHECK:STDOUT: %RightShift.decl: %RightShift.type.1 = fn_decl @RightShift.1 [template = constants.%RightShift] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -307,17 +287,11 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc6_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_18: init type = call constants.%Int(%int_32.loc6_18) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_18.1: type = value_of_initializer %int.make_type_signed.loc6_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_18.2: type = converted %int.make_type_signed.loc6_18, %.loc6_18.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc6_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_26: init type = call constants.%Int(%int_32.loc6_26) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_26.1: type = value_of_initializer %int.make_type_signed.loc6_26 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_26.2: type = converted %int.make_type_signed.loc6_26, %.loc6_26.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc6_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_34: init type = call constants.%Int(%int_32.loc6_34) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_34.1: type = value_of_initializer %int.make_type_signed.loc6_34 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_34.2: type = converted %int.make_type_signed.loc6_34, %.loc6_34.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6_34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -325,32 +299,28 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %Negate.decl: %Negate.type.1 = fn_decl @Negate.1 [template = constants.%Negate] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc7_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_14: init type = call constants.%Int(%int_32.loc7_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_14.1: type = value_of_initializer %int.make_type_signed.loc7_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_14.2: type = converted %int.make_type_signed.loc7_14, %.loc7_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_22: init type = call constants.%Int(%int_32.loc7_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_22.1: type = value_of_initializer %int.make_type_signed.loc7_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_22.2: type = converted %int.make_type_signed.loc7_22, %.loc7_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc10: init type = call constants.%Int(%int_32.loc10) [template = constants.%i32] -// CHECK:STDOUT: %Negate.ref.loc10_17: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %RightShift.ref.loc10: %RightShift.type = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] -// CHECK:STDOUT: %Negate.ref.loc10_35: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %i32.loc10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %Negate.ref.loc10_17: %Negate.type.1 = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %RightShift.ref.loc10: %RightShift.type.1 = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] +// CHECK:STDOUT: %Negate.ref.loc10_35: %Negate.type.1 = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_1.loc10_42: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc10_42: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc10_42: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc10_42: = bound_method %int_1.loc10_42, %impl.elem0.loc10_42 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc10_42: = specific_function %Convert.bound.loc10_42, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc10_42: init %i32 = call %Convert.specific_fn.loc10_42(%int_1.loc10_42) [template = constants.%int_1.2] @@ -360,7 +330,7 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %int_1.loc10_46: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc10_43.1: %i32 = value_of_initializer %int.snegate.loc10_43 [template = constants.%int_-1] // CHECK:STDOUT: %.loc10_43.2: %i32 = converted %int.snegate.loc10_43, %.loc10_43.1 [template = constants.%int_-1] -// CHECK:STDOUT: %impl.elem0.loc10_46: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc10_46: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc10_46: = bound_method %int_1.loc10_46, %impl.elem0.loc10_46 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc10_46: = specific_function %Convert.bound.loc10_46, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc10_46: init %i32 = call %Convert.specific_fn.loc10_46(%int_1.loc10_46) [template = constants.%int_1.2] @@ -370,11 +340,9 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %.loc10_47.1: %i32 = value_of_initializer %int.right_shift.loc10 [template = constants.%int_-1] // CHECK:STDOUT: %.loc10_47.2: %i32 = converted %int.right_shift.loc10, %.loc10_47.1 [template = constants.%int_-1] // CHECK:STDOUT: %int.snegate.loc10_48: init %i32 = call %Negate.ref.loc10_17(%.loc10_47.2) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc10_12.1: type = value_of_initializer %int.make_type_signed.loc10 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_12.2: type = converted %int.make_type_signed.loc10, %.loc10_12.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc10_48: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %impl.elem0.loc10_48: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc10_48: = bound_method %int.snegate.loc10_48, %impl.elem0.loc10_48 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc10_48: = specific_function %Convert.bound.loc10_48, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %Convert.specific_fn.loc10_48: = specific_function %Convert.bound.loc10_48, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %.loc10_48.1: %i32 = value_of_initializer %int.snegate.loc10_48 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc10_48.2: %i32 = converted %int.snegate.loc10_48, %.loc10_48.1 [template = constants.%int_1.2] // CHECK:STDOUT: %int.convert_checked.loc10_48: init Core.IntLiteral = call %Convert.specific_fn.loc10_48(%.loc10_48.2) [template = constants.%int_1.1] @@ -384,19 +352,17 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %arr1.var: ref %array_type.1 = var arr1 // CHECK:STDOUT: %arr1: ref %array_type.1 = bind_name arr1, %arr1.var // 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: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_signed.loc11, %.loc11_14.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc11: type = array_type %int_1.loc11, %i32 [template = constants.%array_type.1] // CHECK:STDOUT: %ptr.loc11: type = ptr_type %array_type.1 [template = constants.%ptr.1] // CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%int_32.loc14) [template = constants.%i32] -// CHECK:STDOUT: %Negate.ref.loc14_17: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %RightShift.ref.loc14: %RightShift.type = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] -// CHECK:STDOUT: %Negate.ref.loc14_35: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %Negate.ref.loc14_17: %Negate.type.1 = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %RightShift.ref.loc14: %RightShift.type.1 = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] +// CHECK:STDOUT: %Negate.ref.loc14_35: %Negate.type.1 = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [template = constants.%int_10.1] -// CHECK:STDOUT: %impl.elem0.loc14_42: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14_42: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_42: = bound_method %int_10, %impl.elem0.loc14_42 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc14_42: = specific_function %Convert.bound.loc14_42, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc14_42: init %i32 = call %Convert.specific_fn.loc14_42(%int_10) [template = constants.%int_10.2] @@ -406,7 +372,7 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc14_44.1: %i32 = value_of_initializer %int.snegate.loc14_44 [template = constants.%int_-10] // CHECK:STDOUT: %.loc14_44.2: %i32 = converted %int.snegate.loc14_44, %.loc14_44.1 [template = constants.%int_-10] -// CHECK:STDOUT: %impl.elem0.loc14_47: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14_47: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_47: = bound_method %int_2, %impl.elem0.loc14_47 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc14_47: = specific_function %Convert.bound.loc14_47, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc14_47: init %i32 = call %Convert.specific_fn.loc14_47(%int_2) [template = constants.%int_2.2] @@ -416,11 +382,9 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %.loc14_48.1: %i32 = value_of_initializer %int.right_shift.loc14 [template = constants.%int_-3] // CHECK:STDOUT: %.loc14_48.2: %i32 = converted %int.right_shift.loc14, %.loc14_48.1 [template = constants.%int_-3] // CHECK:STDOUT: %int.snegate.loc14_49: init %i32 = call %Negate.ref.loc14_17(%.loc14_48.2) [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc14_12.1: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_12.2: type = converted %int.make_type_signed.loc14, %.loc14_12.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc14_49: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %impl.elem0.loc14_49: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc14_49: = bound_method %int.snegate.loc14_49, %impl.elem0.loc14_49 [template = constants.%Convert.bound.5] -// CHECK:STDOUT: %Convert.specific_fn.loc14_49: = specific_function %Convert.bound.loc14_49, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.5] +// CHECK:STDOUT: %Convert.specific_fn.loc14_49: = specific_function %Convert.bound.loc14_49, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.5] // CHECK:STDOUT: %.loc14_49.1: %i32 = value_of_initializer %int.snegate.loc14_49 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc14_49.2: %i32 = converted %int.snegate.loc14_49, %.loc14_49.1 [template = constants.%int_3.1] // CHECK:STDOUT: %int.convert_checked.loc14_49: init Core.IntLiteral = call %Convert.specific_fn.loc14_49(%.loc14_49.2) [template = constants.%int_3.2] @@ -430,17 +394,15 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %arr2.var: ref %array_type.2 = var arr2 // CHECK:STDOUT: %arr2: ref %array_type.2 = bind_name arr2, %arr2.var // 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: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc15_14.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_14.2: type = converted %int.make_type_signed.loc15, %.loc15_14.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc15: type = array_type %int_3, %i32 [template = constants.%array_type.2] // CHECK:STDOUT: %ptr.loc15: type = ptr_type %array_type.2 [template = constants.%ptr.2] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @RightShift(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.right_shift"; +// CHECK:STDOUT: fn @RightShift.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.right_shift"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Negate(%a.param_patt: %i32) -> %i32 = "int.snegate"; +// CHECK:STDOUT: fn @Negate.1(%a.param_patt: %i32) -> %i32 = "int.snegate"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: @@ -457,31 +419,29 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32.1: 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, %int_32.1 [template] -// CHECK:STDOUT: %RightShift.type: type = fn_type @RightShift [template] -// CHECK:STDOUT: %RightShift: %RightShift.type = struct_value () [template] -// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32.1) [template] +// CHECK:STDOUT: %RightShift.type.1: type = fn_type @RightShift.1 [template] +// CHECK:STDOUT: %RightShift: %RightShift.type.1 = struct_value () [template] +// CHECK:STDOUT: %Negate.type.1: type = fn_type @Negate.1 [template] +// CHECK:STDOUT: %Negate: %Negate.type.1 = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %int_31.1: Core.IntLiteral = int_value 31 [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(%int_32.1) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32.1) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32.1) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_31.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_31.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32.1) [template] // CHECK:STDOUT: %int_31.2: %i32 = int_value 31 [template] // CHECK:STDOUT: %int_0: %i32 = int_value 0 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_32.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_32.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32.1) [template] // CHECK:STDOUT: %int_32.2: %i32 = int_value 32 [template] // CHECK:STDOUT: %int_33.1: Core.IntLiteral = int_value 33 [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_33.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_33.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32.1) [template] // CHECK:STDOUT: %int_33.2: %i32 = int_value 33 [template] // CHECK:STDOUT: %int_-1: %i32 = int_value -1 [template] @@ -490,7 +450,7 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -507,7 +467,7 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: .negative = @__global_init.%negative // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %RightShift.decl: %RightShift.type = fn_decl @RightShift [template = constants.%RightShift] { +// CHECK:STDOUT: %RightShift.decl: %RightShift.type.1 = fn_decl @RightShift.1 [template = constants.%RightShift] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -516,17 +476,11 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc4_18: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_18: init type = call constants.%Int(%int_32.loc4_18) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_18.1: type = value_of_initializer %int.make_type_signed.loc4_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_18.2: type = converted %int.make_type_signed.loc4_18, %.loc4_18.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_18: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_26: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_26: init type = call constants.%Int(%int_32.loc4_26) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_26.1: type = value_of_initializer %int.make_type_signed.loc4_26 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_26.2: type = converted %int.make_type_signed.loc4_26, %.loc4_26.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_26: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_34: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %int.make_type_signed.loc4_34: init type = call constants.%Int(%int_32.loc4_34) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_34.1: type = value_of_initializer %int.make_type_signed.loc4_34 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_34.2: type = converted %int.make_type_signed.loc4_34, %.loc4_34.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_34: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -534,59 +488,47 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %Negate.decl: %Negate.type.1 = fn_decl @Negate.1 [template = constants.%Negate] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc5_14: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_14: init type = call constants.%Int(%int_32.loc5_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_14.1: type = value_of_initializer %int.make_type_signed.loc5_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_14.2: type = converted %int.make_type_signed.loc5_14, %.loc5_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_14: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_22: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %int.make_type_signed.loc5_22: init type = call constants.%Int(%int_32.loc5_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_22.1: type = value_of_initializer %int.make_type_signed.loc5_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_22.2: type = converted %int.make_type_signed.loc5_22, %.loc5_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_22: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_32.loc8) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_13.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_13.2: type = converted %int.make_type_signed.loc8, %.loc8_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc8: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// 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: %i32.loc13: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc18: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %int.make_type_signed.loc18: init type = call constants.%Int(%int_32.loc18) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_13.1: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_13.2: type = converted %int.make_type_signed.loc18, %.loc18_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc18: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc24: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %int.make_type_signed.loc24: init type = call constants.%Int(%int_32.loc24) [template = constants.%i32] -// CHECK:STDOUT: %.loc24_15.1: type = value_of_initializer %int.make_type_signed.loc24 [template = constants.%i32] -// CHECK:STDOUT: %.loc24_15.2: type = converted %int.make_type_signed.loc24, %.loc24_15.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc24: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @RightShift(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.right_shift"; +// CHECK:STDOUT: fn @RightShift.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.right_shift"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Negate(%a.param_patt: %i32) -> %i32 = "int.snegate"; +// CHECK:STDOUT: fn @Negate.1(%a.param_patt: %i32) -> %i32 = "int.snegate"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %RightShift.ref.loc8: %RightShift.type = name_ref RightShift, file.%RightShift.decl [template = constants.%RightShift] +// CHECK:STDOUT: %RightShift.ref.loc8: %RightShift.type.1 = name_ref RightShift, file.%RightShift.decl [template = constants.%RightShift] // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_31: Core.IntLiteral = int_value 31 [template = constants.%int_31.1] -// CHECK:STDOUT: %impl.elem0.loc8_30: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc8_30: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc8_30: = bound_method %int_1.loc8, %impl.elem0.loc8_30 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc8_30: = specific_function %Convert.bound.loc8_30, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc8_30: init %i32 = call %Convert.specific_fn.loc8_30(%int_1.loc8) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc8_30.1: %i32 = value_of_initializer %int.convert_checked.loc8_30 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc8_30.2: %i32 = converted %int_1.loc8, %.loc8_30.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc8_33: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc8_33: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc8_33: = bound_method %int_31, %impl.elem0.loc8_33 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc8_33: = specific_function %Convert.bound.loc8_33, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc8_33: init %i32 = call %Convert.specific_fn.loc8_33(%int_31) [template = constants.%int_31.2] @@ -596,16 +538,16 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %.loc8_36.1: %i32 = value_of_initializer %int.right_shift.loc8 [template = constants.%int_0] // CHECK:STDOUT: %.loc8_36.2: %i32 = converted %int.right_shift.loc8, %.loc8_36.1 [template = constants.%int_0] // CHECK:STDOUT: %size_1: %i32 = bind_name size_1, %.loc8_36.2 -// CHECK:STDOUT: %RightShift.ref.loc13: %RightShift.type = name_ref RightShift, file.%RightShift.decl [template = constants.%RightShift] +// CHECK:STDOUT: %RightShift.ref.loc13: %RightShift.type.1 = name_ref RightShift, file.%RightShift.decl [template = constants.%RightShift] // CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %impl.elem0.loc13_30: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13_30: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13_30: = bound_method %int_1.loc13, %impl.elem0.loc13_30 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc13_30: = specific_function %Convert.bound.loc13_30, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc13_30: init %i32 = call %Convert.specific_fn.loc13_30(%int_1.loc13) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc13_30.1: %i32 = value_of_initializer %int.convert_checked.loc13_30 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc13_30.2: %i32 = converted %int_1.loc13, %.loc13_30.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc13_33: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13_33: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13_33: = bound_method %int_32, %impl.elem0.loc13_33 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc13_33: = specific_function %Convert.bound.loc13_33, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc13_33: init %i32 = call %Convert.specific_fn.loc13_33(%int_32) [template = constants.%int_32.2] @@ -615,16 +557,16 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %.loc13_36.1: %i32 = value_of_initializer %int.right_shift.loc13 [template = ] // CHECK:STDOUT: %.loc13_36.2: %i32 = converted %int.right_shift.loc13, %.loc13_36.1 [template = ] // CHECK:STDOUT: %size_2: %i32 = bind_name size_2, %.loc13_36.2 -// CHECK:STDOUT: %RightShift.ref.loc18: %RightShift.type = name_ref RightShift, file.%RightShift.decl [template = constants.%RightShift] +// CHECK:STDOUT: %RightShift.ref.loc18: %RightShift.type.1 = name_ref RightShift, file.%RightShift.decl [template = constants.%RightShift] // CHECK:STDOUT: %int_1.loc18: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_33: Core.IntLiteral = int_value 33 [template = constants.%int_33.1] -// CHECK:STDOUT: %impl.elem0.loc18_30: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc18_30: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc18_30: = bound_method %int_1.loc18, %impl.elem0.loc18_30 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc18_30: = specific_function %Convert.bound.loc18_30, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc18_30: init %i32 = call %Convert.specific_fn.loc18_30(%int_1.loc18) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc18_30.1: %i32 = value_of_initializer %int.convert_checked.loc18_30 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc18_30.2: %i32 = converted %int_1.loc18, %.loc18_30.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc18_33: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc18_33: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc18_33: = bound_method %int_33, %impl.elem0.loc18_33 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc18_33: = specific_function %Convert.bound.loc18_33, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc18_33: init %i32 = call %Convert.specific_fn.loc18_33(%int_33) [template = constants.%int_33.2] @@ -634,18 +576,18 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %.loc18_36.1: %i32 = value_of_initializer %int.right_shift.loc18 [template = ] // CHECK:STDOUT: %.loc18_36.2: %i32 = converted %int.right_shift.loc18, %.loc18_36.1 [template = ] // CHECK:STDOUT: %size_3: %i32 = bind_name size_3, %.loc18_36.2 -// CHECK:STDOUT: %RightShift.ref.loc24: %RightShift.type = name_ref RightShift, file.%RightShift.decl [template = constants.%RightShift] +// CHECK:STDOUT: %RightShift.ref.loc24: %RightShift.type.1 = name_ref RightShift, file.%RightShift.decl [template = constants.%RightShift] // CHECK:STDOUT: %int_1.loc24_32: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_1.loc24_42: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc24_42: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc24_42: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc24_42: = bound_method %int_1.loc24_42, %impl.elem0.loc24_42 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc24_42: = specific_function %Convert.bound.loc24_42, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc24_42: init %i32 = call %Convert.specific_fn.loc24_42(%int_1.loc24_42) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc24_42.1: %i32 = value_of_initializer %int.convert_checked.loc24_42 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc24_42.2: %i32 = converted %int_1.loc24_42, %.loc24_42.1 [template = constants.%int_1.2] // CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc24_42.2) [template = constants.%int_-1] -// CHECK:STDOUT: %impl.elem0.loc24_32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc24_32: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc24_32: = bound_method %int_1.loc24_32, %impl.elem0.loc24_32 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc24_32: = specific_function %Convert.bound.loc24_32, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc24_32: init %i32 = call %Convert.specific_fn.loc24_32(%int_1.loc24_32) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/builtins/int/sadd.carbon b/toolchain/check/testdata/builtins/int/sadd.carbon index a416c5490335..2e9e4df436a3 100644 --- a/toolchain/check/testdata/builtins/int/sadd.carbon +++ b/toolchain/check/testdata/builtins/int/sadd.carbon @@ -93,30 +93,28 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Add.type: type = fn_type @Add [template] -// CHECK:STDOUT: %Add: %Add.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Add.type.1: type = fn_type @Add.1 [template] +// CHECK:STDOUT: %Add: %Add.type.1 = struct_value () [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: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %int_3.1: %i32 = int_value 3 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.15 [template] -// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.11 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.3(%int_32) [template] // CHECK:STDOUT: %int_3.2: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %array_type: type = array_type %int_3.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -127,7 +125,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -142,7 +140,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Add.decl: %Add.type = fn_decl @Add [template = constants.%Add] { +// CHECK:STDOUT: %Add.decl: %Add.type.1 = fn_decl @Add.1 [template = constants.%Add] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -151,17 +149,11 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%int_32.loc2_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_signed.loc2_11, %.loc2_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%int_32.loc2_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_signed.loc2_19, %.loc2_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%int_32.loc2_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_signed.loc2_27, %.loc2_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -170,28 +162,26 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // 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: %Add.ref: %Add.type = name_ref Add, %Add.decl [template = constants.%Add] +// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %Add.ref: %Add.type.1 = name_ref Add, %Add.decl [template = constants.%Add] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_1, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_1, %.loc4_20.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_2, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_2) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_2.2] // CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_2, %.loc4_23.1 [template = constants.%int_2.2] // CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.sadd, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.sadd [template = constants.%int_3.1] // CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.sadd, %.loc4_24.1 [template = constants.%int_3.1] // CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_3.2] @@ -201,10 +191,8 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var // 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: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc5: type = array_type %int_3, %i32 [template = constants.%array_type] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -216,17 +204,11 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -236,11 +218,11 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Add(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.sadd"; +// CHECK:STDOUT: fn @Add.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.sadd"; // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, file.%Add.decl [template = constants.%Add] +// CHECK:STDOUT: %Add.ref: %Add.type.1 = name_ref Add, file.%Add.decl [template = constants.%Add] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%a.ref, %b.ref) @@ -261,9 +243,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] // CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [template] // CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany [template] @@ -276,18 +256,18 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %JustRight: %JustRight.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] @@ -301,8 +281,8 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .Bool = %import_ref.2 -// CHECK:STDOUT: .ImplicitAs = %import_ref.3 +// CHECK:STDOUT: .Bool = %import_ref.5 +// CHECK:STDOUT: .ImplicitAs = %import_ref.6 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -331,13 +311,9 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc8_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc8_14: init type = call constants.%Int(%int_32.loc8_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_14.1: type = value_of_initializer %int.make_type_signed.loc8_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_14.2: type = converted %int.make_type_signed.loc8_14, %.loc8_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc8_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc8_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc8_22: init type = call constants.%Int(%int_32.loc8_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_22.1: type = value_of_initializer %int.make_type_signed.loc8_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_22.2: type = converted %int.make_type_signed.loc8_22, %.loc8_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc8_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -354,21 +330,13 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc13_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_15: init type = call constants.%Int(%int_32.loc13_15) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %int.make_type_signed.loc13_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_15.2: type = converted %int.make_type_signed.loc13_15, %.loc13_15.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_23: init type = call constants.%Int(%int_32.loc13_23) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %int.make_type_signed.loc13_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.2: type = converted %int.make_type_signed.loc13_23, %.loc13_23.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_31: init type = call constants.%Int(%int_32.loc13_31) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %int.make_type_signed.loc13_31 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.2: type = converted %int.make_type_signed.loc13_31, %.loc13_31.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_31: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_39: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_39: init type = call constants.%Int(%int_32.loc13_39) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_39.1: type = value_of_initializer %int.make_type_signed.loc13_39 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_39.2: type = converted %int.make_type_signed.loc13_39, %.loc13_39.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_39: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -387,13 +355,9 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc18_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc18_21: init type = call constants.%Int(%int_32.loc18_21) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_21.1: type = value_of_initializer %int.make_type_signed.loc18_21 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_21.2: type = converted %int.make_type_signed.loc18_21, %.loc18_21.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc18_21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc18_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc18_29: init type = call constants.%Int(%int_32.loc18_29) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_29.1: type = value_of_initializer %int.make_type_signed.loc18_29 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_29.2: type = converted %int.make_type_signed.loc18_29, %.loc18_29.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc18_29: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc18_37.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc18_37.2: type = converted %bool.make_type, %.loc18_37.1 [template = bool] @@ -413,17 +377,11 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc19_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc19_17: init type = call constants.%Int(%int_32.loc19_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_17.1: type = value_of_initializer %int.make_type_signed.loc19_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_17.2: type = converted %int.make_type_signed.loc19_17, %.loc19_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc19_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc19_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc19_25: init type = call constants.%Int(%int_32.loc19_25) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_25.1: type = value_of_initializer %int.make_type_signed.loc19_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_25.2: type = converted %int.make_type_signed.loc19_25, %.loc19_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc19_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc19_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc19_33: init type = call constants.%Int(%int_32.loc19_33) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_33.1: type = value_of_initializer %int.make_type_signed.loc19_33 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_33.2: type = converted %int.make_type_signed.loc19_33, %.loc19_33.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc19_33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -432,79 +390,71 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %int_32.loc25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc25: init type = call constants.%Int(%int_32.loc25) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, %TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %int_1.loc25: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc25: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc25: = bound_method %int_1.loc25, %impl.elem0.loc25 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc25: = specific_function %Convert.bound.loc25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc25: init %i32 = call %Convert.specific_fn.loc25(%int_1.loc25) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc25_27.1: %i32 = value_of_initializer %int.convert_checked.loc25 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc25_27.2: %i32 = converted %int_1.loc25, %.loc25_27.1 [template = constants.%int_1.2] // CHECK:STDOUT: %TooFew.call: init %i32 = call %TooFew.ref(%.loc25_27.2) -// CHECK:STDOUT: %.loc25_15.1: type = value_of_initializer %int.make_type_signed.loc25 [template = constants.%i32] -// CHECK:STDOUT: %.loc25_15.2: type = converted %int.make_type_signed.loc25, %.loc25_15.1 [template = constants.%i32] // CHECK:STDOUT: %too_few.var: ref = var too_few // CHECK:STDOUT: %too_few: ref = bind_name too_few, %too_few.var // CHECK:STDOUT: %int_32.loc30: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc30: init type = call constants.%Int(%int_32.loc30) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc30: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %int_1.loc30: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc30: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %int_3.loc30: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %impl.elem0.loc30_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc30_29: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc30_29: = bound_method %int_1.loc30, %impl.elem0.loc30_29 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc30_29: = specific_function %Convert.bound.loc30_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc30_29: init %i32 = call %Convert.specific_fn.loc30_29(%int_1.loc30) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc30_29.1: %i32 = value_of_initializer %int.convert_checked.loc30_29 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc30_29.2: %i32 = converted %int_1.loc30, %.loc30_29.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc30_32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc30_32: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc30_32: = bound_method %int_2.loc30, %impl.elem0.loc30_32 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc30_32: = specific_function %Convert.bound.loc30_32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc30_32: init %i32 = call %Convert.specific_fn.loc30_32(%int_2.loc30) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc30_32.1: %i32 = value_of_initializer %int.convert_checked.loc30_32 [template = constants.%int_2.2] // CHECK:STDOUT: %.loc30_32.2: %i32 = converted %int_2.loc30, %.loc30_32.1 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc30_35: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc30_35: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc30_35: = bound_method %int_3.loc30, %impl.elem0.loc30_35 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc30_35: = specific_function %Convert.bound.loc30_35, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc30_35: init %i32 = call %Convert.specific_fn.loc30_35(%int_3.loc30) [template = constants.%int_3.2] // CHECK:STDOUT: %.loc30_35.1: %i32 = value_of_initializer %int.convert_checked.loc30_35 [template = constants.%int_3.2] // CHECK:STDOUT: %.loc30_35.2: %i32 = converted %int_3.loc30, %.loc30_35.1 [template = constants.%int_3.2] // CHECK:STDOUT: %TooMany.call: init %i32 = call %TooMany.ref(%.loc30_29.2, %.loc30_32.2, %.loc30_35.2) -// CHECK:STDOUT: %.loc30_16.1: type = value_of_initializer %int.make_type_signed.loc30 [template = constants.%i32] -// CHECK:STDOUT: %.loc30_16.2: type = converted %int.make_type_signed.loc30, %.loc30_16.1 [template = constants.%i32] // CHECK:STDOUT: %too_many.var: ref = var too_many // CHECK:STDOUT: %too_many: ref = bind_name too_many, %too_many.var // CHECK:STDOUT: %int_32.loc35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc35: init type = call constants.%Int(%int_32.loc35) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %int_1.loc35: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc35: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc35_42: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc35_42: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc35_42: = bound_method %int_1.loc35, %impl.elem0.loc35_42 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc35_42: = specific_function %Convert.bound.loc35_42, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc35_42: init %i32 = call %Convert.specific_fn.loc35_42(%int_1.loc35) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc35_42.1: %i32 = value_of_initializer %int.convert_checked.loc35_42 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc35_42.2: %i32 = converted %int_1.loc35, %.loc35_42.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc35_45: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc35_45: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc35_45: = bound_method %int_2.loc35, %impl.elem0.loc35_45 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc35_45: = specific_function %Convert.bound.loc35_45, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc35_45: init %i32 = call %Convert.specific_fn.loc35_45(%int_2.loc35) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc35_45.1: %i32 = value_of_initializer %int.convert_checked.loc35_45 [template = constants.%int_2.2] // CHECK:STDOUT: %.loc35_45.2: %i32 = converted %int_2.loc35, %.loc35_45.1 [template = constants.%int_2.2] // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%.loc35_42.2, %.loc35_45.2) -// CHECK:STDOUT: %.loc35_23.1: type = value_of_initializer %int.make_type_signed.loc35 [template = constants.%i32] -// CHECK:STDOUT: %.loc35_23.2: type = converted %int.make_type_signed.loc35, %.loc35_23.1 [template = constants.%i32] // CHECK:STDOUT: %bad_return_type.var: ref = var bad_return_type // CHECK:STDOUT: %bad_return_type: ref = bind_name bad_return_type, %bad_return_type.var // CHECK:STDOUT: %int_32.loc44: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc44: init type = call constants.%Int(%int_32.loc44) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc44: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %JustRight.ref: %JustRight.type = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] // CHECK:STDOUT: %int_1.loc44: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc44: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %int_3.loc44: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc44_16.1: type = value_of_initializer %int.make_type_signed.loc44 [template = constants.%i32] -// CHECK:STDOUT: %.loc44_16.2: type = converted %int.make_type_signed.loc44, %.loc44_16.1 [template = constants.%i32] // CHECK:STDOUT: %array_type: type = array_type , %i32 [template = ] // CHECK:STDOUT: %bad_call.var: ref = var bad_call // CHECK:STDOUT: %bad_call: ref = bind_name bad_call, %bad_call.var @@ -515,13 +465,9 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc46_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc46_25: init type = call constants.%Int(%int_32.loc46_25) [template = constants.%i32] -// CHECK:STDOUT: %.loc46_25.1: type = value_of_initializer %int.make_type_signed.loc46_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc46_25.2: type = converted %int.make_type_signed.loc46_25, %.loc46_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc46_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc46_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc46_33: init type = call constants.%Int(%int_32.loc46_33) [template = constants.%i32] -// CHECK:STDOUT: %.loc46_33.1: type = value_of_initializer %int.make_type_signed.loc46_33 [template = constants.%i32] -// CHECK:STDOUT: %.loc46_33.2: type = converted %int.make_type_signed.loc46_33, %.loc46_33.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc46_33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -538,21 +484,13 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc50_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc50_26: init type = call constants.%Int(%int_32.loc50_26) [template = constants.%i32] -// CHECK:STDOUT: %.loc50_26.1: type = value_of_initializer %int.make_type_signed.loc50_26 [template = constants.%i32] -// CHECK:STDOUT: %.loc50_26.2: type = converted %int.make_type_signed.loc50_26, %.loc50_26.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc50_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc50_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc50_34: init type = call constants.%Int(%int_32.loc50_34) [template = constants.%i32] -// CHECK:STDOUT: %.loc50_34.1: type = value_of_initializer %int.make_type_signed.loc50_34 [template = constants.%i32] -// CHECK:STDOUT: %.loc50_34.2: type = converted %int.make_type_signed.loc50_34, %.loc50_34.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc50_34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc50_42: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc50_42: init type = call constants.%Int(%int_32.loc50_42) [template = constants.%i32] -// CHECK:STDOUT: %.loc50_42.1: type = value_of_initializer %int.make_type_signed.loc50_42 [template = constants.%i32] -// CHECK:STDOUT: %.loc50_42.2: type = converted %int.make_type_signed.loc50_42, %.loc50_42.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc50_42: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc50_50: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc50_50: init type = call constants.%Int(%int_32.loc50_50) [template = constants.%i32] -// CHECK:STDOUT: %.loc50_50.1: type = value_of_initializer %int.make_type_signed.loc50_50 [template = constants.%i32] -// CHECK:STDOUT: %.loc50_50.2: type = converted %int.make_type_signed.loc50_50, %.loc50_50.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc50_50: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -571,13 +509,9 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc54_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc54_32: init type = call constants.%Int(%int_32.loc54_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc54_32.1: type = value_of_initializer %int.make_type_signed.loc54_32 [template = constants.%i32] -// CHECK:STDOUT: %.loc54_32.2: type = converted %int.make_type_signed.loc54_32, %.loc54_32.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc54_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc54_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc54_40: init type = call constants.%Int(%int_32.loc54_40) [template = constants.%i32] -// CHECK:STDOUT: %.loc54_40.1: type = value_of_initializer %int.make_type_signed.loc54_40 [template = constants.%i32] -// CHECK:STDOUT: %.loc54_40.2: type = converted %int.make_type_signed.loc54_40, %.loc54_40.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc54_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc54_48.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc54_48.2: type = converted %bool.make_type, %.loc54_48.1 [template = bool] @@ -635,25 +569,23 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Add.type: type = fn_type @Add [template] -// CHECK:STDOUT: %Add: %Add.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Add.type.1: type = fn_type @Add.1 [template] +// CHECK:STDOUT: %Add: %Add.type.1 = struct_value () [template] // CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2147483647.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_-2147483648: %i32 = int_value -2147483648 [template] @@ -662,7 +594,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -676,7 +608,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: .b = @__global_init.%b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Add.decl: %Add.type = fn_decl @Add [template = constants.%Add] { +// CHECK:STDOUT: %Add.decl: %Add.type.1 = fn_decl @Add.1 [template = constants.%Add] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -685,17 +617,11 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%int_32.loc4_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_signed.loc4_19, %.loc4_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -704,29 +630,25 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_signed.loc6, %.loc6_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc10: init type = call constants.%Int(%int_32.loc10) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8.1: type = value_of_initializer %int.make_type_signed.loc10 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8.2: type = converted %int.make_type_signed.loc10, %.loc10_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Add(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.sadd"; +// CHECK:STDOUT: fn @Add.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.sadd"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Add.ref.loc6: %Add.type = name_ref Add, file.%Add.decl [template = constants.%Add] +// CHECK:STDOUT: %Add.ref.loc6: %Add.type.1 = name_ref Add, file.%Add.decl [template = constants.%Add] // CHECK:STDOUT: %int_2147483647.loc6: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc6_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc6_18: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc6_18: = bound_method %int_2147483647.loc6, %impl.elem0.loc6_18 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc6_18: = specific_function %Convert.bound.loc6_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc6_18: init %i32 = call %Convert.specific_fn.loc6_18(%int_2147483647.loc6) [template = constants.%int_2147483647.2] // CHECK:STDOUT: %.loc6_18.1: %i32 = value_of_initializer %int.convert_checked.loc6_18 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %.loc6_18.2: %i32 = converted %int_2147483647.loc6, %.loc6_18.1 [template = constants.%int_2147483647.2] -// CHECK:STDOUT: %impl.elem0.loc6_30: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc6_30: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc6_30: = bound_method %int_0, %impl.elem0.loc6_30 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc6_30: = specific_function %Convert.bound.loc6_30, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc6_30: init %i32 = call %Convert.specific_fn.loc6_30(%int_0) [template = constants.%int_0.2] @@ -736,16 +658,16 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %.loc6_32.1: %i32 = value_of_initializer %int.sadd.loc6 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %.loc6_32.2: %i32 = converted %int.sadd.loc6, %.loc6_32.1 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc6_32.2 -// CHECK:STDOUT: %Add.ref.loc10: %Add.type = name_ref Add, file.%Add.decl [template = constants.%Add] +// CHECK:STDOUT: %Add.ref.loc10: %Add.type.1 = name_ref Add, file.%Add.decl [template = constants.%Add] // CHECK:STDOUT: %int_2147483647.loc10: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc10_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc10_18: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc10_18: = bound_method %int_2147483647.loc10, %impl.elem0.loc10_18 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc10_18: = specific_function %Convert.bound.loc10_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc10_18: init %i32 = call %Convert.specific_fn.loc10_18(%int_2147483647.loc10) [template = constants.%int_2147483647.2] // CHECK:STDOUT: %.loc10_18.1: %i32 = value_of_initializer %int.convert_checked.loc10_18 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %.loc10_18.2: %i32 = converted %int_2147483647.loc10, %.loc10_18.1 [template = constants.%int_2147483647.2] -// CHECK:STDOUT: %impl.elem0.loc10_30: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc10_30: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc10_30: = bound_method %int_1, %impl.elem0.loc10_30 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc10_30: = specific_function %Convert.bound.loc10_30, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc10_30: init %i32 = call %Convert.specific_fn.loc10_30(%int_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/builtins/int/sdiv.carbon b/toolchain/check/testdata/builtins/int/sdiv.carbon index 16f03145da43..a834a6133611 100644 --- a/toolchain/check/testdata/builtins/int/sdiv.carbon +++ b/toolchain/check/testdata/builtins/int/sdiv.carbon @@ -61,30 +61,28 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Div.type: type = fn_type @Div [template] -// CHECK:STDOUT: %Div: %Div.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Div.type.1: type = fn_type @Div.1 [template] +// CHECK:STDOUT: %Div: %Div.type.1 = struct_value () [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %int_1.1: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.15 [template] -// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.11 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.3(%int_32) [template] // CHECK:STDOUT: %int_1.2: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %array_type: type = array_type %int_1.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -95,7 +93,7 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -110,7 +108,7 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Div.decl: %Div.type = fn_decl @Div [template = constants.%Div] { +// CHECK:STDOUT: %Div.decl: %Div.type.1 = fn_decl @Div.1 [template = constants.%Div] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -119,17 +117,11 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%int_32.loc2_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_signed.loc2_11, %.loc2_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%int_32.loc2_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_signed.loc2_19, %.loc2_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%int_32.loc2_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_signed.loc2_27, %.loc2_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -138,28 +130,26 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // 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: %Div.ref: %Div.type = name_ref Div, %Div.decl [template = constants.%Div] +// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %Div.ref: %Div.type.1 = name_ref Div, %Div.decl [template = constants.%Div] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_3, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_3) [template = constants.%int_3.2] // CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_3.2] // CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_3, %.loc4_20.1 [template = constants.%int_3.2] -// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_2, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_2) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_2.2] // CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_2, %.loc4_23.1 [template = constants.%int_2.2] // CHECK:STDOUT: %int.sdiv: init %i32 = call %Div.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_1.1] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.sdiv, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.sdiv [template = constants.%int_1.1] // CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.sdiv, %.loc4_24.1 [template = constants.%int_1.1] // CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_1.2] @@ -169,10 +159,8 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var // 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: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc5: type = array_type %int_1, %i32 [template = constants.%array_type] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -184,17 +172,11 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -204,11 +186,11 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Div(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.sdiv"; +// CHECK:STDOUT: fn @Div.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.sdiv"; // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Div.ref: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Div.ref: %Div.type.1 = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.sdiv: init %i32 = call %Div.ref(%a.ref, %b.ref) @@ -229,26 +211,24 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Div.type: type = fn_type @Div [template] -// CHECK:STDOUT: %Div: %Div.type = struct_value () [template] -// CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] -// CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] -// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Div.type.1: type = fn_type @Div.1 [template] +// CHECK:STDOUT: %Div: %Div.type.1 = struct_value () [template] +// CHECK:STDOUT: %Sub.type.1: type = fn_type @Sub.1 [template] +// CHECK:STDOUT: %Sub: %Sub.type.1 = struct_value () [template] +// CHECK:STDOUT: %Negate.type.1: type = fn_type @Negate.1 [template] +// CHECK:STDOUT: %Negate: %Negate.type.1 = struct_value () [template] // CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2147483647.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] // CHECK:STDOUT: %int_-2147483647: %i32 = int_value -2147483647 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_-1: %i32 = int_value -1 [template] @@ -258,7 +238,7 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -275,7 +255,7 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: .c = @__global_init.%c // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Div.decl: %Div.type = fn_decl @Div [template = constants.%Div] { +// CHECK:STDOUT: %Div.decl: %Div.type.1 = fn_decl @Div.1 [template = constants.%Div] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -284,17 +264,11 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%int_32.loc4_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_signed.loc4_19, %.loc4_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -302,7 +276,7 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Sub.decl: %Sub.type = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %Sub.decl: %Sub.type.1 = fn_decl @Sub.1 [template = constants.%Sub] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -311,17 +285,11 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_11: init type = call constants.%Int(%int_32.loc5_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_signed.loc5_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_signed.loc5_11, %.loc5_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_19: init type = call constants.%Int(%int_32.loc5_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %int.make_type_signed.loc5_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_signed.loc5_19, %.loc5_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_27: init type = call constants.%Int(%int_32.loc5_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.1: type = value_of_initializer %int.make_type_signed.loc5_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.2: type = converted %int.make_type_signed.loc5_27, %.loc5_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -329,60 +297,50 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %Negate.decl: %Negate.type.1 = fn_decl @Negate.1 [template = constants.%Negate] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_14: init type = call constants.%Int(%int_32.loc6_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_signed.loc6_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_signed.loc6_14, %.loc6_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc6_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_22: init type = call constants.%Int(%int_32.loc6_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int.make_type_signed.loc6_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.2: type = converted %int.make_type_signed.loc6_22, %.loc6_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%int_32.loc9) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_8.1: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_8.2: type = converted %int.make_type_signed.loc9, %.loc9_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc9: type = class_type @Int, @Int(constants.%int_32) [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_8.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_signed.loc12, %.loc12_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [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_8.1: type = value_of_initializer %int.make_type_signed.loc19 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_8.2: type = converted %int.make_type_signed.loc19, %.loc19_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Div(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.sdiv"; +// CHECK:STDOUT: fn @Div.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.sdiv"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Sub(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.ssub"; +// CHECK:STDOUT: fn @Sub.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.ssub"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Negate(%a.param_patt: %i32) -> %i32 = "int.snegate"; +// CHECK:STDOUT: fn @Negate.1(%a.param_patt: %i32) -> %i32 = "int.snegate"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Div.ref.loc9: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] -// CHECK:STDOUT: %Negate.ref.loc9_18: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Div.ref.loc9: %Div.type.1 = name_ref Div, file.%Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Negate.ref.loc9_18: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_2147483647.loc9: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc9_25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_25: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_25: = bound_method %int_2147483647.loc9, %impl.elem0.loc9_25 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc9_25: = specific_function %Convert.bound.loc9_25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc9_25: init %i32 = call %Convert.specific_fn.loc9_25(%int_2147483647.loc9) [template = constants.%int_2147483647.2] // CHECK:STDOUT: %.loc9_25.1: %i32 = value_of_initializer %int.convert_checked.loc9_25 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %.loc9_25.2: %i32 = converted %int_2147483647.loc9, %.loc9_25.1 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %int.snegate.loc9_36: init %i32 = call %Negate.ref.loc9_18(%.loc9_25.2) [template = constants.%int_-2147483647] -// CHECK:STDOUT: %Negate.ref.loc9_39: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc9_39: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc9_46: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_46: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_46: = bound_method %int_1.loc9, %impl.elem0.loc9_46 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc9_46: = specific_function %Convert.bound.loc9_46, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc9_46: init %i32 = call %Convert.specific_fn.loc9_46(%int_1.loc9) [template = constants.%int_1.2] @@ -397,11 +355,11 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.sdiv.loc9 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.sdiv.loc9, %.loc9_49.1 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc9_49.2 -// CHECK:STDOUT: %Div.ref.loc12: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] -// CHECK:STDOUT: %Sub.ref.loc12: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Div.ref.loc12: %Div.type.1 = name_ref Div, file.%Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Sub.ref.loc12: %Sub.type.1 = name_ref Sub, file.%Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc12: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_2147483647.loc12: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc12_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_29: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_29: = bound_method %int_2147483647.loc12, %impl.elem0.loc12_29 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc12_29: = specific_function %Convert.bound.loc12_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc12_29: init %i32 = call %Convert.specific_fn.loc12_29(%int_2147483647.loc12) [template = constants.%int_2147483647.2] @@ -411,7 +369,7 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %int_1.loc12_43: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc12_40.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%int_-2147483647] // CHECK:STDOUT: %.loc12_40.2: %i32 = converted %int.snegate.loc12, %.loc12_40.1 [template = constants.%int_-2147483647] -// CHECK:STDOUT: %impl.elem0.loc12_43: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_43: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_43: = bound_method %int_1.loc12_43, %impl.elem0.loc12_43 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc12_43: = specific_function %Convert.bound.loc12_43, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %Convert.specific_fn.loc12_43(%int_1.loc12_43) [template = constants.%int_1.2] @@ -421,7 +379,7 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %int_1.loc12_47: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc12_44.1: %i32 = value_of_initializer %int.ssub.loc12 [template = constants.%int_-2147483648] // CHECK:STDOUT: %.loc12_44.2: %i32 = converted %int.ssub.loc12, %.loc12_44.1 [template = constants.%int_-2147483648] -// CHECK:STDOUT: %impl.elem0.loc12_47: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_47: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_47: = bound_method %int_1.loc12_47, %impl.elem0.loc12_47 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc12_47: = specific_function %Convert.bound.loc12_47, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc12_47: init %i32 = call %Convert.specific_fn.loc12_47(%int_1.loc12_47) [template = constants.%int_1.2] @@ -431,11 +389,11 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %.loc12_49.1: %i32 = value_of_initializer %int.sdiv.loc12 [template = constants.%int_-2147483648] // CHECK:STDOUT: %.loc12_49.2: %i32 = converted %int.sdiv.loc12, %.loc12_49.1 [template = constants.%int_-2147483648] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc12_49.2 -// CHECK:STDOUT: %Div.ref.loc19: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] -// CHECK:STDOUT: %Sub.ref.loc19: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %Negate.ref.loc19_22: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Div.ref.loc19: %Div.type.1 = name_ref Div, file.%Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Sub.ref.loc19: %Sub.type.1 = name_ref Sub, file.%Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc19_22: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_2147483647.loc19: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc19_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc19_29: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc19_29: = bound_method %int_2147483647.loc19, %impl.elem0.loc19_29 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc19_29: = specific_function %Convert.bound.loc19_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc19_29: init %i32 = call %Convert.specific_fn.loc19_29(%int_2147483647.loc19) [template = constants.%int_2147483647.2] @@ -445,16 +403,16 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %int_1.loc19_43: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc19_40.1: %i32 = value_of_initializer %int.snegate.loc19_40 [template = constants.%int_-2147483647] // CHECK:STDOUT: %.loc19_40.2: %i32 = converted %int.snegate.loc19_40, %.loc19_40.1 [template = constants.%int_-2147483647] -// CHECK:STDOUT: %impl.elem0.loc19_43: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc19_43: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc19_43: = bound_method %int_1.loc19_43, %impl.elem0.loc19_43 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc19_43: = specific_function %Convert.bound.loc19_43, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc19_43: init %i32 = call %Convert.specific_fn.loc19_43(%int_1.loc19_43) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc19_43.1: %i32 = value_of_initializer %int.convert_checked.loc19_43 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc19_43.2: %i32 = converted %int_1.loc19_43, %.loc19_43.1 [template = constants.%int_1.2] // CHECK:STDOUT: %int.ssub.loc19: init %i32 = call %Sub.ref.loc19(%.loc19_40.2, %.loc19_43.2) [template = constants.%int_-2147483648] -// CHECK:STDOUT: %Negate.ref.loc19_47: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc19_47: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_1.loc19_54: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc19_54: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc19_54: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc19_54: = bound_method %int_1.loc19_54, %impl.elem0.loc19_54 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc19_54: = specific_function %Convert.bound.loc19_54, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc19_54: init %i32 = call %Convert.specific_fn.loc19_54(%int_1.loc19_54) [template = constants.%int_1.2] @@ -476,21 +434,19 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Div.type: type = fn_type @Div [template] -// CHECK:STDOUT: %Div: %Div.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Div.type.1: type = fn_type @Div.1 [template] +// CHECK:STDOUT: %Div: %Div.type.1 = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -498,7 +454,7 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -512,7 +468,7 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: .b = @__global_init.%b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Div.decl: %Div.type = fn_decl @Div [template = constants.%Div] { +// CHECK:STDOUT: %Div.decl: %Div.type.1 = fn_decl @Div.1 [template = constants.%Div] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -521,17 +477,11 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%int_32.loc4_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_signed.loc4_19, %.loc4_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -540,29 +490,25 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc10: init type = call constants.%Int(%int_32.loc10) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8.1: type = value_of_initializer %int.make_type_signed.loc10 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8.2: type = converted %int.make_type_signed.loc10, %.loc10_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc10: type = class_type @Int, @Int(constants.%int_32) [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: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Div(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.sdiv"; +// CHECK:STDOUT: fn @Div.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.sdiv"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Div.ref.loc10: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Div.ref.loc10: %Div.type.1 = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_0.loc10: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc10_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc10_18: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc10_18: = bound_method %int_1, %impl.elem0.loc10_18 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc10_18: = specific_function %Convert.bound.loc10_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc10_18: init %i32 = call %Convert.specific_fn.loc10_18(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc10_18.1: %i32 = value_of_initializer %int.convert_checked.loc10_18 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc10_18.2: %i32 = converted %int_1, %.loc10_18.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc10_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc10_21: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc10_21: = bound_method %int_0.loc10, %impl.elem0.loc10_21 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc10_21: = specific_function %Convert.bound.loc10_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc10_21: init %i32 = call %Convert.specific_fn.loc10_21(%int_0.loc10) [template = constants.%int_0.2] @@ -572,16 +518,16 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %.loc10_23.1: %i32 = value_of_initializer %int.sdiv.loc10 [template = ] // CHECK:STDOUT: %.loc10_23.2: %i32 = converted %int.sdiv.loc10, %.loc10_23.1 [template = ] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc10_23.2 -// CHECK:STDOUT: %Div.ref.loc15: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Div.ref.loc15: %Div.type.1 = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %int_0.loc15_18: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_0.loc15_21: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc15_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc15_18: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc15_18: = bound_method %int_0.loc15_18, %impl.elem0.loc15_18 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc15_18: = specific_function %Convert.bound.loc15_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc15_18: init %i32 = call %Convert.specific_fn.loc15_18(%int_0.loc15_18) [template = constants.%int_0.2] // CHECK:STDOUT: %.loc15_18.1: %i32 = value_of_initializer %int.convert_checked.loc15_18 [template = constants.%int_0.2] // CHECK:STDOUT: %.loc15_18.2: %i32 = converted %int_0.loc15_18, %.loc15_18.1 [template = constants.%int_0.2] -// CHECK:STDOUT: %impl.elem0.loc15_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc15_21: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc15_21: = bound_method %int_0.loc15_21, %impl.elem0.loc15_21 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc15_21: = specific_function %Convert.bound.loc15_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc15_21: init %i32 = call %Convert.specific_fn.loc15_21(%int_0.loc15_21) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/builtins/int/smod.carbon b/toolchain/check/testdata/builtins/int/smod.carbon index 56e1872126d7..514490a086f0 100644 --- a/toolchain/check/testdata/builtins/int/smod.carbon +++ b/toolchain/check/testdata/builtins/int/smod.carbon @@ -64,30 +64,28 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Mod.type: type = fn_type @Mod [template] -// CHECK:STDOUT: %Mod: %Mod.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Mod.type.1: type = fn_type @Mod.1 [template] +// CHECK:STDOUT: %Mod: %Mod.type.1 = struct_value () [template] // CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_5.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %int_2.1: %i32 = int_value 2 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.15 [template] -// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.11 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.3(%int_32) [template] // CHECK:STDOUT: %int_2.2: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %array_type: type = array_type %int_2.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -98,7 +96,7 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -113,7 +111,7 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Mod.decl: %Mod.type = fn_decl @Mod [template = constants.%Mod] { +// CHECK:STDOUT: %Mod.decl: %Mod.type.1 = fn_decl @Mod.1 [template = constants.%Mod] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -122,17 +120,11 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%int_32.loc2_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_signed.loc2_11, %.loc2_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%int_32.loc2_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_signed.loc2_19, %.loc2_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%int_32.loc2_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_signed.loc2_27, %.loc2_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -141,28 +133,26 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // 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: %Mod.ref: %Mod.type = name_ref Mod, %Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %Mod.ref: %Mod.type.1 = name_ref Mod, %Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_5, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_5) [template = constants.%int_5.2] // CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_5.2] // CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_5, %.loc4_20.1 [template = constants.%int_5.2] -// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_3, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_3) [template = constants.%int_3.2] // CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_3.2] // CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_3, %.loc4_23.1 [template = constants.%int_3.2] // CHECK:STDOUT: %int.smod: init %i32 = call %Mod.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_2.1] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.smod, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.smod [template = constants.%int_2.1] // CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.smod, %.loc4_24.1 [template = constants.%int_2.1] // CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_2.2] @@ -172,10 +162,8 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var // 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: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc5: type = array_type %int_2, %i32 [template = constants.%array_type] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -187,17 +175,11 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -207,11 +189,11 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Mod(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.smod"; +// CHECK:STDOUT: fn @Mod.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.smod"; // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Mod.ref: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Mod.ref: %Mod.type.1 = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.smod: init %i32 = call %Mod.ref(%a.ref, %b.ref) @@ -232,26 +214,24 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Mod.type: type = fn_type @Mod [template] -// CHECK:STDOUT: %Mod: %Mod.type = struct_value () [template] -// CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] -// CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] -// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Mod.type.1: type = fn_type @Mod.1 [template] +// CHECK:STDOUT: %Mod: %Mod.type.1 = struct_value () [template] +// CHECK:STDOUT: %Sub.type.1: type = fn_type @Sub.1 [template] +// CHECK:STDOUT: %Sub: %Sub.type.1 = struct_value () [template] +// CHECK:STDOUT: %Negate.type.1: type = fn_type @Negate.1 [template] +// CHECK:STDOUT: %Negate: %Negate.type.1 = struct_value () [template] // CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2147483647.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] // CHECK:STDOUT: %int_-2147483647: %i32 = int_value -2147483647 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_-1: %i32 = int_value -1 [template] @@ -262,7 +242,7 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -279,7 +259,7 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: .c = @__global_init.%c // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Mod.decl: %Mod.type = fn_decl @Mod [template = constants.%Mod] { +// CHECK:STDOUT: %Mod.decl: %Mod.type.1 = fn_decl @Mod.1 [template = constants.%Mod] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -288,17 +268,11 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%int_32.loc4_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_signed.loc4_19, %.loc4_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -306,7 +280,7 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Sub.decl: %Sub.type = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %Sub.decl: %Sub.type.1 = fn_decl @Sub.1 [template = constants.%Sub] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -315,17 +289,11 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_11: init type = call constants.%Int(%int_32.loc5_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_signed.loc5_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_signed.loc5_11, %.loc5_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_19: init type = call constants.%Int(%int_32.loc5_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %int.make_type_signed.loc5_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_signed.loc5_19, %.loc5_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_27: init type = call constants.%Int(%int_32.loc5_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.1: type = value_of_initializer %int.make_type_signed.loc5_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.2: type = converted %int.make_type_signed.loc5_27, %.loc5_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -333,60 +301,50 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %Negate.decl: %Negate.type.1 = fn_decl @Negate.1 [template = constants.%Negate] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_14: init type = call constants.%Int(%int_32.loc6_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_signed.loc6_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_signed.loc6_14, %.loc6_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc6_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_22: init type = call constants.%Int(%int_32.loc6_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int.make_type_signed.loc6_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.2: type = converted %int.make_type_signed.loc6_22, %.loc6_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%int_32.loc9) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_8.1: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_8.2: type = converted %int.make_type_signed.loc9, %.loc9_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc9: type = class_type @Int, @Int(constants.%int_32) [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_8.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_signed.loc12, %.loc12_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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_8.1: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32] -// CHECK:STDOUT: %.loc20_8.2: type = converted %int.make_type_signed.loc20, %.loc20_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Mod(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.smod"; +// CHECK:STDOUT: fn @Mod.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.smod"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Sub(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.ssub"; +// CHECK:STDOUT: fn @Sub.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.ssub"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Negate(%a.param_patt: %i32) -> %i32 = "int.snegate"; +// CHECK:STDOUT: fn @Negate.1(%a.param_patt: %i32) -> %i32 = "int.snegate"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Mod.ref.loc9: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] -// CHECK:STDOUT: %Negate.ref.loc9_18: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Mod.ref.loc9: %Mod.type.1 = name_ref Mod, file.%Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Negate.ref.loc9_18: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_2147483647.loc9: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc9_25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_25: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_25: = bound_method %int_2147483647.loc9, %impl.elem0.loc9_25 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc9_25: = specific_function %Convert.bound.loc9_25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc9_25: init %i32 = call %Convert.specific_fn.loc9_25(%int_2147483647.loc9) [template = constants.%int_2147483647.2] // CHECK:STDOUT: %.loc9_25.1: %i32 = value_of_initializer %int.convert_checked.loc9_25 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %.loc9_25.2: %i32 = converted %int_2147483647.loc9, %.loc9_25.1 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %int.snegate.loc9_36: init %i32 = call %Negate.ref.loc9_18(%.loc9_25.2) [template = constants.%int_-2147483647] -// CHECK:STDOUT: %Negate.ref.loc9_39: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc9_39: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc9_46: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_46: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_46: = bound_method %int_1.loc9, %impl.elem0.loc9_46 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc9_46: = specific_function %Convert.bound.loc9_46, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc9_46: init %i32 = call %Convert.specific_fn.loc9_46(%int_1.loc9) [template = constants.%int_1.2] @@ -401,11 +359,11 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.smod.loc9 [template = constants.%int_0] // CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.smod.loc9, %.loc9_49.1 [template = constants.%int_0] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc9_49.2 -// CHECK:STDOUT: %Mod.ref.loc12: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] -// CHECK:STDOUT: %Sub.ref.loc12: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Mod.ref.loc12: %Mod.type.1 = name_ref Mod, file.%Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Sub.ref.loc12: %Sub.type.1 = name_ref Sub, file.%Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc12: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_2147483647.loc12: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc12_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_29: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_29: = bound_method %int_2147483647.loc12, %impl.elem0.loc12_29 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc12_29: = specific_function %Convert.bound.loc12_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc12_29: init %i32 = call %Convert.specific_fn.loc12_29(%int_2147483647.loc12) [template = constants.%int_2147483647.2] @@ -415,7 +373,7 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %int_1.loc12_43: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc12_40.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%int_-2147483647] // CHECK:STDOUT: %.loc12_40.2: %i32 = converted %int.snegate.loc12, %.loc12_40.1 [template = constants.%int_-2147483647] -// CHECK:STDOUT: %impl.elem0.loc12_43: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_43: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_43: = bound_method %int_1.loc12_43, %impl.elem0.loc12_43 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc12_43: = specific_function %Convert.bound.loc12_43, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %Convert.specific_fn.loc12_43(%int_1.loc12_43) [template = constants.%int_1.2] @@ -425,7 +383,7 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %int_1.loc12_47: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc12_44.1: %i32 = value_of_initializer %int.ssub.loc12 [template = constants.%int_-2147483648] // CHECK:STDOUT: %.loc12_44.2: %i32 = converted %int.ssub.loc12, %.loc12_44.1 [template = constants.%int_-2147483648] -// CHECK:STDOUT: %impl.elem0.loc12_47: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_47: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_47: = bound_method %int_1.loc12_47, %impl.elem0.loc12_47 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc12_47: = specific_function %Convert.bound.loc12_47, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc12_47: init %i32 = call %Convert.specific_fn.loc12_47(%int_1.loc12_47) [template = constants.%int_1.2] @@ -435,11 +393,11 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %.loc12_49.1: %i32 = value_of_initializer %int.smod.loc12 [template = constants.%int_0] // CHECK:STDOUT: %.loc12_49.2: %i32 = converted %int.smod.loc12, %.loc12_49.1 [template = constants.%int_0] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc12_49.2 -// CHECK:STDOUT: %Mod.ref.loc20: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] -// CHECK:STDOUT: %Sub.ref.loc20: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %Negate.ref.loc20_22: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Mod.ref.loc20: %Mod.type.1 = name_ref Mod, file.%Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Sub.ref.loc20: %Sub.type.1 = name_ref Sub, file.%Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc20_22: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_2147483647.loc20: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc20_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc20_29: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc20_29: = bound_method %int_2147483647.loc20, %impl.elem0.loc20_29 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc20_29: = specific_function %Convert.bound.loc20_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc20_29: init %i32 = call %Convert.specific_fn.loc20_29(%int_2147483647.loc20) [template = constants.%int_2147483647.2] @@ -449,16 +407,16 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %int_1.loc20_43: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc20_40.1: %i32 = value_of_initializer %int.snegate.loc20_40 [template = constants.%int_-2147483647] // CHECK:STDOUT: %.loc20_40.2: %i32 = converted %int.snegate.loc20_40, %.loc20_40.1 [template = constants.%int_-2147483647] -// CHECK:STDOUT: %impl.elem0.loc20_43: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc20_43: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc20_43: = bound_method %int_1.loc20_43, %impl.elem0.loc20_43 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc20_43: = specific_function %Convert.bound.loc20_43, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc20_43: init %i32 = call %Convert.specific_fn.loc20_43(%int_1.loc20_43) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc20_43.1: %i32 = value_of_initializer %int.convert_checked.loc20_43 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc20_43.2: %i32 = converted %int_1.loc20_43, %.loc20_43.1 [template = constants.%int_1.2] // CHECK:STDOUT: %int.ssub.loc20: init %i32 = call %Sub.ref.loc20(%.loc20_40.2, %.loc20_43.2) [template = constants.%int_-2147483648] -// CHECK:STDOUT: %Negate.ref.loc20_47: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc20_47: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_1.loc20_54: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc20_54: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc20_54: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc20_54: = bound_method %int_1.loc20_54, %impl.elem0.loc20_54 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc20_54: = specific_function %Convert.bound.loc20_54, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc20_54: init %i32 = call %Convert.specific_fn.loc20_54(%int_1.loc20_54) [template = constants.%int_1.2] @@ -480,21 +438,19 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Mod.type: type = fn_type @Mod [template] -// CHECK:STDOUT: %Mod: %Mod.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Mod.type.1: type = fn_type @Mod.1 [template] +// CHECK:STDOUT: %Mod: %Mod.type.1 = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -502,7 +458,7 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -516,7 +472,7 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: .b = @__global_init.%b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Mod.decl: %Mod.type = fn_decl @Mod [template = constants.%Mod] { +// CHECK:STDOUT: %Mod.decl: %Mod.type.1 = fn_decl @Mod.1 [template = constants.%Mod] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -525,17 +481,11 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%int_32.loc4_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_signed.loc4_19, %.loc4_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -544,29 +494,25 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // 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_8.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_signed.loc12, %.loc12_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%int_32.loc17) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_8.1: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_8.2: type = converted %int.make_type_signed.loc17, %.loc17_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Mod(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.smod"; +// CHECK:STDOUT: fn @Mod.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.smod"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Mod.ref.loc12: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Mod.ref.loc12: %Mod.type.1 = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_0.loc12: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc12_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_18: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_18: = bound_method %int_1, %impl.elem0.loc12_18 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc12_18: = specific_function %Convert.bound.loc12_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc12_18: init %i32 = call %Convert.specific_fn.loc12_18(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc12_18.1: %i32 = value_of_initializer %int.convert_checked.loc12_18 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc12_18.2: %i32 = converted %int_1, %.loc12_18.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc12_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_21: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_21: = bound_method %int_0.loc12, %impl.elem0.loc12_21 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc12_21: = specific_function %Convert.bound.loc12_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc12_21: init %i32 = call %Convert.specific_fn.loc12_21(%int_0.loc12) [template = constants.%int_0.2] @@ -576,16 +522,16 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %.loc12_23.1: %i32 = value_of_initializer %int.smod.loc12 [template = ] // CHECK:STDOUT: %.loc12_23.2: %i32 = converted %int.smod.loc12, %.loc12_23.1 [template = ] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc12_23.2 -// CHECK:STDOUT: %Mod.ref.loc17: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Mod.ref.loc17: %Mod.type.1 = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %int_0.loc17_18: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_0.loc17_21: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc17_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc17_18: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc17_18: = bound_method %int_0.loc17_18, %impl.elem0.loc17_18 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc17_18: = specific_function %Convert.bound.loc17_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc17_18: init %i32 = call %Convert.specific_fn.loc17_18(%int_0.loc17_18) [template = constants.%int_0.2] // CHECK:STDOUT: %.loc17_18.1: %i32 = value_of_initializer %int.convert_checked.loc17_18 [template = constants.%int_0.2] // CHECK:STDOUT: %.loc17_18.2: %i32 = converted %int_0.loc17_18, %.loc17_18.1 [template = constants.%int_0.2] -// CHECK:STDOUT: %impl.elem0.loc17_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc17_21: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc17_21: = bound_method %int_0.loc17_21, %impl.elem0.loc17_21 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc17_21: = specific_function %Convert.bound.loc17_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc17_21: init %i32 = call %Convert.specific_fn.loc17_21(%int_0.loc17_21) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/builtins/int/smul.carbon b/toolchain/check/testdata/builtins/int/smul.carbon index 7b66682a1754..28c34a728c36 100644 --- a/toolchain/check/testdata/builtins/int/smul.carbon +++ b/toolchain/check/testdata/builtins/int/smul.carbon @@ -35,30 +35,28 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Mul.type: type = fn_type @Mul [template] -// CHECK:STDOUT: %Mul: %Mul.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Mul.type.1: type = fn_type @Mul.1 [template] +// CHECK:STDOUT: %Mul: %Mul.type.1 = struct_value () [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %int_6.1: %i32 = int_value 6 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_6.1, %Convert.15 [template] -// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_6.1, %Convert.11 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.3(%int_32) [template] // CHECK:STDOUT: %int_6.2: Core.IntLiteral = int_value 6 [template] // CHECK:STDOUT: %array_type: type = array_type %int_6.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -69,7 +67,7 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -84,7 +82,7 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Mul.decl: %Mul.type = fn_decl @Mul [template = constants.%Mul] { +// CHECK:STDOUT: %Mul.decl: %Mul.type.1 = fn_decl @Mul.1 [template = constants.%Mul] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -93,17 +91,11 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%int_32.loc2_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_signed.loc2_11, %.loc2_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%int_32.loc2_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_signed.loc2_19, %.loc2_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%int_32.loc2_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_signed.loc2_27, %.loc2_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -112,28 +104,26 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // 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: %Mul.ref: %Mul.type = name_ref Mul, %Mul.decl [template = constants.%Mul] +// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %Mul.ref: %Mul.type.1 = name_ref Mul, %Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_3, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_3) [template = constants.%int_3.2] // CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_3.2] // CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_3, %.loc4_20.1 [template = constants.%int_3.2] -// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_2, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_2) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_2.2] // CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_2, %.loc4_23.1 [template = constants.%int_2.2] // CHECK:STDOUT: %int.smul: init %i32 = call %Mul.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_6.1] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.smul, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.smul [template = constants.%int_6.1] // CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.smul, %.loc4_24.1 [template = constants.%int_6.1] // CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_6.2] @@ -143,10 +133,8 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var // 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: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.2] -// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc5: type = array_type %int_6, %i32 [template = constants.%array_type] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -158,17 +146,11 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -178,11 +160,11 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Mul(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.smul"; +// CHECK:STDOUT: fn @Mul.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.smul"; // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Mul.ref: %Mul.type = name_ref Mul, file.%Mul.decl [template = constants.%Mul] +// CHECK:STDOUT: %Mul.ref: %Mul.type.1 = name_ref Mul, file.%Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.smul: init %i32 = call %Mul.ref(%a.ref, %b.ref) @@ -203,26 +185,24 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Mul.type: type = fn_type @Mul [template] -// CHECK:STDOUT: %Mul: %Mul.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Mul.type.1: type = fn_type @Mul.1 [template] +// CHECK:STDOUT: %Mul: %Mul.type.1 = struct_value () [template] // CHECK:STDOUT: %int_32767.1: Core.IntLiteral = int_value 32767 [template] // CHECK:STDOUT: %int_65536.1: Core.IntLiteral = int_value 65536 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_32767.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_32767.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_32767.2: %i32 = int_value 32767 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_65536.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_65536.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_65536.2: %i32 = int_value 65536 [template] // CHECK:STDOUT: %int_2147418112: %i32 = int_value 2147418112 [template] // CHECK:STDOUT: %int_32768.1: Core.IntLiteral = int_value 32768 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_32768.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_32768.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_32768.2: %i32 = int_value 32768 [template] // CHECK:STDOUT: %int_-2147483648: %i32 = int_value -2147483648 [template] @@ -231,7 +211,7 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -245,7 +225,7 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: .b = @__global_init.%b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Mul.decl: %Mul.type = fn_decl @Mul [template = constants.%Mul] { +// CHECK:STDOUT: %Mul.decl: %Mul.type.1 = fn_decl @Mul.1 [template = constants.%Mul] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -254,17 +234,11 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%int_32.loc4_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_signed.loc4_19, %.loc4_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -273,29 +247,25 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_signed.loc6, %.loc6_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc10: init type = call constants.%Int(%int_32.loc10) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8.1: type = value_of_initializer %int.make_type_signed.loc10 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8.2: type = converted %int.make_type_signed.loc10, %.loc10_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Mul(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.smul"; +// CHECK:STDOUT: fn @Mul.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.smul"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Mul.ref.loc6: %Mul.type = name_ref Mul, file.%Mul.decl [template = constants.%Mul] +// CHECK:STDOUT: %Mul.ref.loc6: %Mul.type.1 = name_ref Mul, file.%Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %int_32767: Core.IntLiteral = int_value 32767 [template = constants.%int_32767.1] // CHECK:STDOUT: %int_65536.loc6: Core.IntLiteral = int_value 65536 [template = constants.%int_65536.1] -// CHECK:STDOUT: %impl.elem0.loc6_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc6_18: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc6_18: = bound_method %int_32767, %impl.elem0.loc6_18 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc6_18: = specific_function %Convert.bound.loc6_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc6_18: init %i32 = call %Convert.specific_fn.loc6_18(%int_32767) [template = constants.%int_32767.2] // CHECK:STDOUT: %.loc6_18.1: %i32 = value_of_initializer %int.convert_checked.loc6_18 [template = constants.%int_32767.2] // CHECK:STDOUT: %.loc6_18.2: %i32 = converted %int_32767, %.loc6_18.1 [template = constants.%int_32767.2] -// CHECK:STDOUT: %impl.elem0.loc6_26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc6_26: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc6_26: = bound_method %int_65536.loc6, %impl.elem0.loc6_26 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc6_26: = specific_function %Convert.bound.loc6_26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc6_26: init %i32 = call %Convert.specific_fn.loc6_26(%int_65536.loc6) [template = constants.%int_65536.2] @@ -305,16 +275,16 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %.loc6_34.1: %i32 = value_of_initializer %int.smul.loc6 [template = constants.%int_2147418112] // CHECK:STDOUT: %.loc6_34.2: %i32 = converted %int.smul.loc6, %.loc6_34.1 [template = constants.%int_2147418112] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc6_34.2 -// CHECK:STDOUT: %Mul.ref.loc10: %Mul.type = name_ref Mul, file.%Mul.decl [template = constants.%Mul] +// CHECK:STDOUT: %Mul.ref.loc10: %Mul.type.1 = name_ref Mul, file.%Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %int_32768: Core.IntLiteral = int_value 32768 [template = constants.%int_32768.1] // CHECK:STDOUT: %int_65536.loc10: Core.IntLiteral = int_value 65536 [template = constants.%int_65536.1] -// CHECK:STDOUT: %impl.elem0.loc10_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc10_18: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc10_18: = bound_method %int_32768, %impl.elem0.loc10_18 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc10_18: = specific_function %Convert.bound.loc10_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc10_18: init %i32 = call %Convert.specific_fn.loc10_18(%int_32768) [template = constants.%int_32768.2] // CHECK:STDOUT: %.loc10_18.1: %i32 = value_of_initializer %int.convert_checked.loc10_18 [template = constants.%int_32768.2] // CHECK:STDOUT: %.loc10_18.2: %i32 = converted %int_32768, %.loc10_18.1 [template = constants.%int_32768.2] -// CHECK:STDOUT: %impl.elem0.loc10_26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc10_26: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc10_26: = bound_method %int_65536.loc10, %impl.elem0.loc10_26 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc10_26: = specific_function %Convert.bound.loc10_26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc10_26: init %i32 = call %Convert.specific_fn.loc10_26(%int_65536.loc10) [template = constants.%int_65536.2] diff --git a/toolchain/check/testdata/builtins/int/snegate.carbon b/toolchain/check/testdata/builtins/int/snegate.carbon index f4019fdfa809..78e436b3f7fc 100644 --- a/toolchain/check/testdata/builtins/int/snegate.carbon +++ b/toolchain/check/testdata/builtins/int/snegate.carbon @@ -120,30 +120,28 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Negate.type.1: type = fn_type @Negate.1 [template] +// CHECK:STDOUT: %Negate: %Negate.type.1 = struct_value () [template] // CHECK:STDOUT: %int_123.1: Core.IntLiteral = int_value 123 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_123.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_123.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_123.2: %i32 = int_value 123 [template] // CHECK:STDOUT: %int_-123: %i32 = int_value -123 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_123.2, %Convert.15 [template] -// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_123.2, %Convert.11 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.3(%int_32) [template] // CHECK:STDOUT: %array_type: type = array_type %int_123.1, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_-1: %i32 = int_value -1 [template] @@ -154,7 +152,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -170,31 +168,27 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %Negate.decl: %Negate.type.1 = fn_decl @Negate.1 [template = constants.%Negate] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc2_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_14: init type = call constants.%Int(%int_32.loc2_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_14.1: type = value_of_initializer %int.make_type_signed.loc2_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_14.2: type = converted %int.make_type_signed.loc2_14, %.loc2_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_22: init type = call constants.%Int(%int_32.loc2_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_22.1: type = value_of_initializer %int.make_type_signed.loc2_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_22.2: type = converted %int.make_type_signed.loc2_22, %.loc2_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // 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: %Negate.ref.loc4_16: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %Negate.ref.loc4_23: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %Negate.ref.loc4_16: %Negate.type.1 = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc4_23: %Negate.type.1 = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_123.loc4: Core.IntLiteral = int_value 123 [template = constants.%int_123.1] -// CHECK:STDOUT: %impl.elem0.loc4_30: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_30: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_30: = bound_method %int_123.loc4, %impl.elem0.loc4_30 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc4_30: = specific_function %Convert.bound.loc4_30, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc4_30: init %i32 = call %Convert.specific_fn.loc4_30(%int_123.loc4) [template = constants.%int_123.2] @@ -204,11 +198,9 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %.loc4_33.1: %i32 = value_of_initializer %int.snegate.loc4_33 [template = constants.%int_-123] // CHECK:STDOUT: %.loc4_33.2: %i32 = converted %int.snegate.loc4_33, %.loc4_33.1 [template = constants.%int_-123] // CHECK:STDOUT: %int.snegate.loc4_34: init %i32 = call %Negate.ref.loc4_16(%.loc4_33.2) [template = constants.%int_123.2] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc4_34: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %impl.elem0.loc4_34: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc4_34: = bound_method %int.snegate.loc4_34, %impl.elem0.loc4_34 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc4_34: = specific_function %Convert.bound.loc4_34, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %Convert.specific_fn.loc4_34: = specific_function %Convert.bound.loc4_34, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %.loc4_34.1: %i32 = value_of_initializer %int.snegate.loc4_34 [template = constants.%int_123.2] // CHECK:STDOUT: %.loc4_34.2: %i32 = converted %int.snegate.loc4_34, %.loc4_34.1 [template = constants.%int_123.2] // CHECK:STDOUT: %int.convert_checked.loc4_34: init Core.IntLiteral = call %Convert.specific_fn.loc4_34(%.loc4_34.2) [template = constants.%int_123.1] @@ -218,16 +210,12 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var // 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: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_123.loc5: Core.IntLiteral = int_value 123 [template = constants.%int_123.1] -// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc5: type = array_type %int_123.loc5, %i32 [template = constants.%array_type] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_signed.loc7, %.loc7_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -237,17 +225,11 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc9_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc9_19: init type = call constants.%Int(%int_32.loc9_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_19.1: type = value_of_initializer %int.make_type_signed.loc9_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_19.2: type = converted %int.make_type_signed.loc9_19, %.loc9_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc9_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc9_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc9_27: init type = call constants.%Int(%int_32.loc9_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_27.1: type = value_of_initializer %int.make_type_signed.loc9_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_27.2: type = converted %int.make_type_signed.loc9_27, %.loc9_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc9_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc9_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc9_35: init type = call constants.%Int(%int_32.loc9_35) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_35.1: type = value_of_initializer %int.make_type_signed.loc9_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_35.2: type = converted %int.make_type_signed.loc9_35, %.loc9_35.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc9_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -257,11 +239,11 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Negate(%a.param_patt: %i32) -> %i32 = "int.snegate"; +// CHECK:STDOUT: fn @Negate.1(%a.param_patt: %i32) -> %i32 = "int.snegate"; // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%a.ref) // CHECK:STDOUT: %.loc10_19.1: %i32 = value_of_initializer %int.snegate @@ -274,9 +256,9 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %arr.ref: ref %array_type = name_ref arr, file.%arr // CHECK:STDOUT: %addr: %ptr = addr_of %arr.ref // CHECK:STDOUT: %arr_p: %ptr = bind_name arr_p, %addr -// CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] @@ -293,9 +275,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] // CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [template] // CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany [template] @@ -309,13 +289,13 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] @@ -329,8 +309,8 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .Bool = %import_ref.2 -// CHECK:STDOUT: .ImplicitAs = %import_ref.3 +// CHECK:STDOUT: .Bool = %import_ref.5 +// CHECK:STDOUT: .ImplicitAs = %import_ref.6 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -357,9 +337,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc8_16.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_16.2: type = converted %int.make_type_signed, %.loc8_16.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -372,17 +350,11 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc13_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_15: init type = call constants.%Int(%int_32.loc13_15) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %int.make_type_signed.loc13_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_15.2: type = converted %int.make_type_signed.loc13_15, %.loc13_15.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_23: init type = call constants.%Int(%int_32.loc13_23) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %int.make_type_signed.loc13_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.2: type = converted %int.make_type_signed.loc13_23, %.loc13_23.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_31: init type = call constants.%Int(%int_32.loc13_31) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %int.make_type_signed.loc13_31 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.2: type = converted %int.make_type_signed.loc13_31, %.loc13_31.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_31: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -397,9 +369,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // 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: %.loc18_21.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc18_21.2: type = converted %int.make_type_signed, %.loc18_21.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc18_29.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc18_29.2: type = converted %bool.make_type, %.loc18_29.1 [template = bool] @@ -415,70 +385,58 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc19_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc19_17: init type = call constants.%Int(%int_32.loc19_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_17.1: type = value_of_initializer %int.make_type_signed.loc19_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_17.2: type = converted %int.make_type_signed.loc19_17, %.loc19_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc19_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc19_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc19_25: init type = call constants.%Int(%int_32.loc19_25) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_25.1: type = value_of_initializer %int.make_type_signed.loc19_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_25.2: type = converted %int.make_type_signed.loc19_25, %.loc19_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc19_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %int_32.loc25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc25: init type = call constants.%Int(%int_32.loc25) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, %TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %TooFew.call: init %i32 = call %TooFew.ref() -// CHECK:STDOUT: %.loc25_15.1: type = value_of_initializer %int.make_type_signed.loc25 [template = constants.%i32] -// CHECK:STDOUT: %.loc25_15.2: type = converted %int.make_type_signed.loc25, %.loc25_15.1 [template = constants.%i32] // CHECK:STDOUT: %too_few.var: ref = var too_few // CHECK:STDOUT: %too_few: ref = bind_name too_few, %too_few.var // CHECK:STDOUT: %int_32.loc30: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc30: init type = call constants.%Int(%int_32.loc30) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc30: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %int_1.loc30: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc30: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc30_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc30_29: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc30_29: = bound_method %int_1.loc30, %impl.elem0.loc30_29 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc30_29: = specific_function %Convert.bound.loc30_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc30_29: init %i32 = call %Convert.specific_fn.loc30_29(%int_1.loc30) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc30_29.1: %i32 = value_of_initializer %int.convert_checked.loc30_29 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc30_29.2: %i32 = converted %int_1.loc30, %.loc30_29.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc30_32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc30_32: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc30_32: = bound_method %int_2.loc30, %impl.elem0.loc30_32 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc30_32: = specific_function %Convert.bound.loc30_32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc30_32: init %i32 = call %Convert.specific_fn.loc30_32(%int_2.loc30) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc30_32.1: %i32 = value_of_initializer %int.convert_checked.loc30_32 [template = constants.%int_2.2] // CHECK:STDOUT: %.loc30_32.2: %i32 = converted %int_2.loc30, %.loc30_32.1 [template = constants.%int_2.2] // CHECK:STDOUT: %TooMany.call: init %i32 = call %TooMany.ref(%.loc30_29.2, %.loc30_32.2) -// CHECK:STDOUT: %.loc30_16.1: type = value_of_initializer %int.make_type_signed.loc30 [template = constants.%i32] -// CHECK:STDOUT: %.loc30_16.2: type = converted %int.make_type_signed.loc30, %.loc30_16.1 [template = constants.%i32] // CHECK:STDOUT: %too_many.var: ref = var too_many // CHECK:STDOUT: %too_many: ref = bind_name too_many, %too_many.var // CHECK:STDOUT: %int_32.loc35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc35: init type = call constants.%Int(%int_32.loc35) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %int_1.loc35: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc35: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc35: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc35: = bound_method %int_1.loc35, %impl.elem0.loc35 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc35: = specific_function %Convert.bound.loc35, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc35: init %i32 = call %Convert.specific_fn.loc35(%int_1.loc35) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc35_42.1: %i32 = value_of_initializer %int.convert_checked.loc35 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc35_42.2: %i32 = converted %int_1.loc35, %.loc35_42.1 [template = constants.%int_1.2] // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%.loc35_42.2) -// CHECK:STDOUT: %.loc35_23.1: type = value_of_initializer %int.make_type_signed.loc35 [template = constants.%i32] -// CHECK:STDOUT: %.loc35_23.2: type = converted %int.make_type_signed.loc35, %.loc35_23.1 [template = constants.%i32] // CHECK:STDOUT: %bad_return_type.var: ref = var bad_return_type // CHECK:STDOUT: %bad_return_type: ref = bind_name bad_return_type, %bad_return_type.var // CHECK:STDOUT: %int_32.loc44: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc44: init type = call constants.%Int(%int_32.loc44) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc44: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %JustRight.ref: %JustRight.type = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] // CHECK:STDOUT: %int_1.loc44: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc44: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %.loc44_16.1: type = value_of_initializer %int.make_type_signed.loc44 [template = constants.%i32] -// CHECK:STDOUT: %.loc44_16.2: type = converted %int.make_type_signed.loc44, %.loc44_16.1 [template = constants.%i32] // CHECK:STDOUT: %array_type: type = array_type , %i32 [template = ] // CHECK:STDOUT: %bad_call.var: ref = var bad_call // CHECK:STDOUT: %bad_call: ref = bind_name bad_call, %bad_call.var @@ -489,13 +447,9 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc46_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc46_25: init type = call constants.%Int(%int_32.loc46_25) [template = constants.%i32] -// CHECK:STDOUT: %.loc46_25.1: type = value_of_initializer %int.make_type_signed.loc46_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc46_25.2: type = converted %int.make_type_signed.loc46_25, %.loc46_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc46_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc46_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc46_33: init type = call constants.%Int(%int_32.loc46_33) [template = constants.%i32] -// CHECK:STDOUT: %.loc46_33.1: type = value_of_initializer %int.make_type_signed.loc46_33 [template = constants.%i32] -// CHECK:STDOUT: %.loc46_33.2: type = converted %int.make_type_signed.loc46_33, %.loc46_33.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc46_33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -512,21 +466,13 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc57_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc57_26: init type = call constants.%Int(%int_32.loc57_26) [template = constants.%i32] -// CHECK:STDOUT: %.loc57_26.1: type = value_of_initializer %int.make_type_signed.loc57_26 [template = constants.%i32] -// CHECK:STDOUT: %.loc57_26.2: type = converted %int.make_type_signed.loc57_26, %.loc57_26.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc57_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc57_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc57_34: init type = call constants.%Int(%int_32.loc57_34) [template = constants.%i32] -// CHECK:STDOUT: %.loc57_34.1: type = value_of_initializer %int.make_type_signed.loc57_34 [template = constants.%i32] -// CHECK:STDOUT: %.loc57_34.2: type = converted %int.make_type_signed.loc57_34, %.loc57_34.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc57_34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc57_42: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc57_42: init type = call constants.%Int(%int_32.loc57_42) [template = constants.%i32] -// CHECK:STDOUT: %.loc57_42.1: type = value_of_initializer %int.make_type_signed.loc57_42 [template = constants.%i32] -// CHECK:STDOUT: %.loc57_42.2: type = converted %int.make_type_signed.loc57_42, %.loc57_42.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc57_42: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc57_50: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc57_50: init type = call constants.%Int(%int_32.loc57_50) [template = constants.%i32] -// CHECK:STDOUT: %.loc57_50.1: type = value_of_initializer %int.make_type_signed.loc57_50 [template = constants.%i32] -// CHECK:STDOUT: %.loc57_50.2: type = converted %int.make_type_signed.loc57_50, %.loc57_50.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc57_50: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -545,13 +491,9 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc68_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc68_32: init type = call constants.%Int(%int_32.loc68_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc68_32.1: type = value_of_initializer %int.make_type_signed.loc68_32 [template = constants.%i32] -// CHECK:STDOUT: %.loc68_32.2: type = converted %int.make_type_signed.loc68_32, %.loc68_32.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc68_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc68_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc68_40: init type = call constants.%Int(%int_32.loc68_40) [template = constants.%i32] -// CHECK:STDOUT: %.loc68_40.1: type = value_of_initializer %int.make_type_signed.loc68_40 [template = constants.%i32] -// CHECK:STDOUT: %.loc68_40.2: type = converted %int.make_type_signed.loc68_40, %.loc68_40.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc68_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc68_48.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc68_48.2: type = converted %bool.make_type, %.loc68_48.1 [template = bool] @@ -600,24 +542,22 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] -// CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] -// CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Negate.type.1: type = fn_type @Negate.1 [template] +// CHECK:STDOUT: %Negate: %Negate.type.1 = struct_value () [template] +// CHECK:STDOUT: %Sub.type.1: type = fn_type @Sub.1 [template] +// CHECK:STDOUT: %Sub: %Sub.type.1 = struct_value () [template] // CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2147483647.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] // CHECK:STDOUT: %int_-2147483647: %i32 = int_value -2147483647 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_-2147483648: %i32 = int_value -2147483648 [template] @@ -626,7 +566,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -641,26 +581,22 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: .b = @__global_init.%b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %Negate.decl: %Negate.type.1 = fn_decl @Negate.1 [template = constants.%Negate] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc4_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_14: init type = call constants.%Int(%int_32.loc4_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_14.1: type = value_of_initializer %int.make_type_signed.loc4_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_14.2: type = converted %int.make_type_signed.loc4_14, %.loc4_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_22: init type = call constants.%Int(%int_32.loc4_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_22.1: type = value_of_initializer %int.make_type_signed.loc4_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_22.2: type = converted %int.make_type_signed.loc4_22, %.loc4_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Sub.decl: %Sub.type = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %Sub.decl: %Sub.type.1 = fn_decl @Sub.1 [template = constants.%Sub] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -669,17 +605,11 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_11: init type = call constants.%Int(%int_32.loc5_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_signed.loc5_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_signed.loc5_11, %.loc5_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_19: init type = call constants.%Int(%int_32.loc5_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %int.make_type_signed.loc5_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_signed.loc5_19, %.loc5_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_27: init type = call constants.%Int(%int_32.loc5_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.1: type = value_of_initializer %int.make_type_signed.loc5_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.2: type = converted %int.make_type_signed.loc5_27, %.loc5_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -688,25 +618,21 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_32.loc8) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8.2: type = converted %int.make_type_signed.loc8, %.loc8_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc8: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%int_32.loc14) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_8.1: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_8.2: type = converted %int.make_type_signed.loc14, %.loc14_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Negate(%a.param_patt: %i32) -> %i32 = "int.snegate"; +// CHECK:STDOUT: fn @Negate.1(%a.param_patt: %i32) -> %i32 = "int.snegate"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Sub(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.ssub"; +// CHECK:STDOUT: fn @Sub.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.ssub"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Negate.ref.loc8_14: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %Negate.ref.loc8_21: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc8_14: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc8_21: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_2147483647.loc8: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc8: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc8: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc8: = bound_method %int_2147483647.loc8, %impl.elem0.loc8 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc8: = specific_function %Convert.bound.loc8, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %Convert.specific_fn.loc8(%int_2147483647.loc8) [template = constants.%int_2147483647.2] @@ -719,11 +645,11 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %.loc8_40.1: %i32 = value_of_initializer %int.snegate.loc8_39 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %.loc8_40.2: %i32 = converted %int.snegate.loc8_39, %.loc8_40.1 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc8_40.2 -// CHECK:STDOUT: %Negate.ref.loc14_14: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %Sub.ref: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %Negate.ref.loc14_25: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc14_14: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Sub.ref: %Sub.type.1 = name_ref Sub, file.%Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc14_25: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_2147483647.loc14: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc14_32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14_32: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_32: = bound_method %int_2147483647.loc14, %impl.elem0.loc14_32 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc14_32: = specific_function %Convert.bound.loc14_32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc14_32: init %i32 = call %Convert.specific_fn.loc14_32(%int_2147483647.loc14) [template = constants.%int_2147483647.2] @@ -733,7 +659,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc14_42.1: %i32 = value_of_initializer %int.snegate.loc14_42 [template = constants.%int_-2147483647] // CHECK:STDOUT: %.loc14_42.2: %i32 = converted %int.snegate.loc14_42, %.loc14_42.1 [template = constants.%int_-2147483647] -// CHECK:STDOUT: %impl.elem0.loc14_45: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14_45: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_45: = bound_method %int_1, %impl.elem0.loc14_45 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc14_45: = specific_function %Convert.bound.loc14_45, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc14_45: init %i32 = call %Convert.specific_fn.loc14_45(%int_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/builtins/int/ssub.carbon b/toolchain/check/testdata/builtins/int/ssub.carbon index 37ceb09c81db..946ff54e7142 100644 --- a/toolchain/check/testdata/builtins/int/ssub.carbon +++ b/toolchain/check/testdata/builtins/int/ssub.carbon @@ -36,30 +36,28 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] -// CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Sub.type.1: type = fn_type @Sub.1 [template] +// CHECK:STDOUT: %Sub: %Sub.type.1 = struct_value () [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %int_1.1: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.15 [template] -// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.11 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.3(%int_32) [template] // CHECK:STDOUT: %int_1.2: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %array_type: type = array_type %int_1.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -70,7 +68,7 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -85,7 +83,7 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Sub.decl: %Sub.type = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %Sub.decl: %Sub.type.1 = fn_decl @Sub.1 [template = constants.%Sub] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -94,17 +92,11 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%int_32.loc2_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_signed.loc2_11, %.loc2_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%int_32.loc2_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_signed.loc2_19, %.loc2_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%int_32.loc2_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_signed.loc2_27, %.loc2_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -113,28 +105,26 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // 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: %Sub.ref: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %Sub.ref: %Sub.type.1 = name_ref Sub, %Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_3, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_3) [template = constants.%int_3.2] // CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_3.2] // CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_3, %.loc4_20.1 [template = constants.%int_3.2] -// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_2, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_2) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_2.2] // CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_2, %.loc4_23.1 [template = constants.%int_2.2] // CHECK:STDOUT: %int.ssub: init %i32 = call %Sub.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_1.1] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.ssub, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.ssub [template = constants.%int_1.1] // CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.ssub, %.loc4_24.1 [template = constants.%int_1.1] // CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_1.2] @@ -144,10 +134,8 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var // 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: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc5: type = array_type %int_1, %i32 [template = constants.%array_type] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -159,17 +147,11 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -179,11 +161,11 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Sub(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.ssub"; +// CHECK:STDOUT: fn @Sub.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.ssub"; // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Sub.ref: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref: %Sub.type.1 = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.ssub: init %i32 = call %Sub.ref(%a.ref, %b.ref) @@ -204,31 +186,29 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] -// CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Sub.type.1: type = fn_type @Sub.1 [template] +// CHECK:STDOUT: %Sub: %Sub.type.1 = struct_value () [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2147483647.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] // CHECK:STDOUT: %int_-2147483647: %i32 = int_value -2147483647 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_-2147483648: %i32 = int_value -2147483648 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } @@ -236,7 +216,7 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -251,7 +231,7 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: .c = @__global_init.%c // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Sub.decl: %Sub.type = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %Sub.decl: %Sub.type.1 = fn_decl @Sub.1 [template = constants.%Sub] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -260,17 +240,11 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%int_32.loc4_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_signed.loc4_19, %.loc4_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -279,33 +253,27 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_signed.loc6, %.loc6_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_signed.loc7, %.loc7_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7: type = class_type @Int, @Int(constants.%int_32) [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_8.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_8.2: type = converted %int.make_type_signed.loc11, %.loc11_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Sub(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.ssub"; +// CHECK:STDOUT: fn @Sub.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.ssub"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Sub.ref.loc6: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref.loc6: %Sub.type.1 = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %int_0.loc6: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_2147483647.loc6: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc6_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc6_18: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc6_18: = bound_method %int_0.loc6, %impl.elem0.loc6_18 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc6_18: = specific_function %Convert.bound.loc6_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc6_18: init %i32 = call %Convert.specific_fn.loc6_18(%int_0.loc6) [template = constants.%int_0.2] // CHECK:STDOUT: %.loc6_18.1: %i32 = value_of_initializer %int.convert_checked.loc6_18 [template = constants.%int_0.2] // CHECK:STDOUT: %.loc6_18.2: %i32 = converted %int_0.loc6, %.loc6_18.1 [template = constants.%int_0.2] -// CHECK:STDOUT: %impl.elem0.loc6_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc6_21: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc6_21: = bound_method %int_2147483647.loc6, %impl.elem0.loc6_21 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc6_21: = specific_function %Convert.bound.loc6_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc6_21: init %i32 = call %Convert.specific_fn.loc6_21(%int_2147483647.loc6) [template = constants.%int_2147483647.2] @@ -315,17 +283,17 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %.loc6_32.1: %i32 = value_of_initializer %int.ssub.loc6 [template = constants.%int_-2147483647] // CHECK:STDOUT: %.loc6_32.2: %i32 = converted %int.ssub.loc6, %.loc6_32.1 [template = constants.%int_-2147483647] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc6_32.2 -// CHECK:STDOUT: %Sub.ref.loc7_14: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %Sub.ref.loc7_18: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref.loc7_14: %Sub.type.1 = name_ref Sub, file.%Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref.loc7_18: %Sub.type.1 = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %int_0.loc7: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_2147483647.loc7: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc7_22: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc7_22: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc7_22: = bound_method %int_0.loc7, %impl.elem0.loc7_22 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc7_22: = specific_function %Convert.bound.loc7_22, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc7_22: init %i32 = call %Convert.specific_fn.loc7_22(%int_0.loc7) [template = constants.%int_0.2] // CHECK:STDOUT: %.loc7_22.1: %i32 = value_of_initializer %int.convert_checked.loc7_22 [template = constants.%int_0.2] // CHECK:STDOUT: %.loc7_22.2: %i32 = converted %int_0.loc7, %.loc7_22.1 [template = constants.%int_0.2] -// CHECK:STDOUT: %impl.elem0.loc7_25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc7_25: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc7_25: = bound_method %int_2147483647.loc7, %impl.elem0.loc7_25 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc7_25: = specific_function %Convert.bound.loc7_25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc7_25: init %i32 = call %Convert.specific_fn.loc7_25(%int_2147483647.loc7) [template = constants.%int_2147483647.2] @@ -335,7 +303,7 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc7_35.1: %i32 = value_of_initializer %int.ssub.loc7_35 [template = constants.%int_-2147483647] // CHECK:STDOUT: %.loc7_35.2: %i32 = converted %int.ssub.loc7_35, %.loc7_35.1 [template = constants.%int_-2147483647] -// CHECK:STDOUT: %impl.elem0.loc7_38: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc7_38: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc7_38: = bound_method %int_1, %impl.elem0.loc7_38 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc7_38: = specific_function %Convert.bound.loc7_38, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc7_38: init %i32 = call %Convert.specific_fn.loc7_38(%int_1) [template = constants.%int_1.2] @@ -345,17 +313,17 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %.loc7_40.1: %i32 = value_of_initializer %int.ssub.loc7_39 [template = constants.%int_-2147483648] // CHECK:STDOUT: %.loc7_40.2: %i32 = converted %int.ssub.loc7_39, %.loc7_40.1 [template = constants.%int_-2147483648] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc7_40.2 -// CHECK:STDOUT: %Sub.ref.loc11_14: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %Sub.ref.loc11_18: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref.loc11_14: %Sub.type.1 = name_ref Sub, file.%Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref.loc11_18: %Sub.type.1 = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %int_0.loc11: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_2147483647.loc11: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc11_22: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_22: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_22: = bound_method %int_0.loc11, %impl.elem0.loc11_22 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_22: = specific_function %Convert.bound.loc11_22, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_22: init %i32 = call %Convert.specific_fn.loc11_22(%int_0.loc11) [template = constants.%int_0.2] // CHECK:STDOUT: %.loc11_22.1: %i32 = value_of_initializer %int.convert_checked.loc11_22 [template = constants.%int_0.2] // CHECK:STDOUT: %.loc11_22.2: %i32 = converted %int_0.loc11, %.loc11_22.1 [template = constants.%int_0.2] -// CHECK:STDOUT: %impl.elem0.loc11_25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_25: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_25: = bound_method %int_2147483647.loc11, %impl.elem0.loc11_25 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_25: = specific_function %Convert.bound.loc11_25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_25: init %i32 = call %Convert.specific_fn.loc11_25(%int_2147483647.loc11) [template = constants.%int_2147483647.2] @@ -365,7 +333,7 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc11_35.1: %i32 = value_of_initializer %int.ssub.loc11_35 [template = constants.%int_-2147483647] // CHECK:STDOUT: %.loc11_35.2: %i32 = converted %int.ssub.loc11_35, %.loc11_35.1 [template = constants.%int_-2147483647] -// CHECK:STDOUT: %impl.elem0.loc11_38: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_38: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_38: = bound_method %int_2, %impl.elem0.loc11_38 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc11_38: = specific_function %Convert.bound.loc11_38, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc11_38: init %i32 = call %Convert.specific_fn.loc11_38(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/builtins/int/uadd.carbon b/toolchain/check/testdata/builtins/int/uadd.carbon index 85ad072365d1..4d45c1f842de 100644 --- a/toolchain/check/testdata/builtins/int/uadd.carbon +++ b/toolchain/check/testdata/builtins/int/uadd.carbon @@ -90,30 +90,28 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Add.type: type = fn_type @Add [template] -// CHECK:STDOUT: %Add: %Add.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Add.type.1: type = fn_type @Add.1 [template] +// CHECK:STDOUT: %Add: %Add.type.1 = struct_value () [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: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %int_3.1: %i32 = int_value 3 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.15 [template] -// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.11 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.3(%int_32) [template] // CHECK:STDOUT: %int_3.2: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %array_type: type = array_type %int_3.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -124,7 +122,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -139,7 +137,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Add.decl: %Add.type = fn_decl @Add [template = constants.%Add] { +// CHECK:STDOUT: %Add.decl: %Add.type.1 = fn_decl @Add.1 [template = constants.%Add] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -148,17 +146,11 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%int_32.loc2_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_signed.loc2_11, %.loc2_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%int_32.loc2_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_signed.loc2_19, %.loc2_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%int_32.loc2_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_signed.loc2_27, %.loc2_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -167,28 +159,26 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // 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: %Add.ref: %Add.type = name_ref Add, %Add.decl [template = constants.%Add] +// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %Add.ref: %Add.type.1 = name_ref Add, %Add.decl [template = constants.%Add] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_1, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_1, %.loc4_20.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_2, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_2) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_2.2] // CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_2, %.loc4_23.1 [template = constants.%int_2.2] // CHECK:STDOUT: %int.uadd: init %i32 = call %Add.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.uadd, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.uadd [template = constants.%int_3.1] // CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.uadd, %.loc4_24.1 [template = constants.%int_3.1] // CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_3.2] @@ -198,10 +188,8 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var // 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: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc5: type = array_type %int_3, %i32 [template = constants.%array_type] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -213,17 +201,11 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -233,11 +215,11 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Add(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.uadd"; +// CHECK:STDOUT: fn @Add.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.uadd"; // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, file.%Add.decl [template = constants.%Add] +// CHECK:STDOUT: %Add.ref: %Add.type.1 = name_ref Add, file.%Add.decl [template = constants.%Add] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.uadd: init %i32 = call %Add.ref(%a.ref, %b.ref) @@ -258,9 +240,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] // CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [template] // CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany [template] @@ -273,18 +253,18 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %JustRight: %JustRight.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] @@ -298,8 +278,8 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .Bool = %import_ref.2 -// CHECK:STDOUT: .ImplicitAs = %import_ref.3 +// CHECK:STDOUT: .Bool = %import_ref.5 +// CHECK:STDOUT: .ImplicitAs = %import_ref.6 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -328,13 +308,9 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc8_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc8_14: init type = call constants.%Int(%int_32.loc8_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_14.1: type = value_of_initializer %int.make_type_signed.loc8_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_14.2: type = converted %int.make_type_signed.loc8_14, %.loc8_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc8_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc8_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc8_22: init type = call constants.%Int(%int_32.loc8_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_22.1: type = value_of_initializer %int.make_type_signed.loc8_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_22.2: type = converted %int.make_type_signed.loc8_22, %.loc8_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc8_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -351,21 +327,13 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc13_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_15: init type = call constants.%Int(%int_32.loc13_15) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %int.make_type_signed.loc13_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_15.2: type = converted %int.make_type_signed.loc13_15, %.loc13_15.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_23: init type = call constants.%Int(%int_32.loc13_23) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %int.make_type_signed.loc13_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.2: type = converted %int.make_type_signed.loc13_23, %.loc13_23.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_31: init type = call constants.%Int(%int_32.loc13_31) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %int.make_type_signed.loc13_31 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.2: type = converted %int.make_type_signed.loc13_31, %.loc13_31.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_31: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_39: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_39: init type = call constants.%Int(%int_32.loc13_39) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_39.1: type = value_of_initializer %int.make_type_signed.loc13_39 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_39.2: type = converted %int.make_type_signed.loc13_39, %.loc13_39.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_39: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -384,13 +352,9 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc18_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc18_21: init type = call constants.%Int(%int_32.loc18_21) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_21.1: type = value_of_initializer %int.make_type_signed.loc18_21 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_21.2: type = converted %int.make_type_signed.loc18_21, %.loc18_21.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc18_21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc18_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc18_29: init type = call constants.%Int(%int_32.loc18_29) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_29.1: type = value_of_initializer %int.make_type_signed.loc18_29 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_29.2: type = converted %int.make_type_signed.loc18_29, %.loc18_29.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc18_29: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc18_37.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc18_37.2: type = converted %bool.make_type, %.loc18_37.1 [template = bool] @@ -410,17 +374,11 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc19_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc19_17: init type = call constants.%Int(%int_32.loc19_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_17.1: type = value_of_initializer %int.make_type_signed.loc19_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_17.2: type = converted %int.make_type_signed.loc19_17, %.loc19_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc19_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc19_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc19_25: init type = call constants.%Int(%int_32.loc19_25) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_25.1: type = value_of_initializer %int.make_type_signed.loc19_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_25.2: type = converted %int.make_type_signed.loc19_25, %.loc19_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc19_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc19_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc19_33: init type = call constants.%Int(%int_32.loc19_33) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_33.1: type = value_of_initializer %int.make_type_signed.loc19_33 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_33.2: type = converted %int.make_type_signed.loc19_33, %.loc19_33.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc19_33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -429,79 +387,71 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %int_32.loc25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc25: init type = call constants.%Int(%int_32.loc25) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, %TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %int_1.loc25: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc25: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc25: = bound_method %int_1.loc25, %impl.elem0.loc25 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc25: = specific_function %Convert.bound.loc25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc25: init %i32 = call %Convert.specific_fn.loc25(%int_1.loc25) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc25_27.1: %i32 = value_of_initializer %int.convert_checked.loc25 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc25_27.2: %i32 = converted %int_1.loc25, %.loc25_27.1 [template = constants.%int_1.2] // CHECK:STDOUT: %TooFew.call: init %i32 = call %TooFew.ref(%.loc25_27.2) -// CHECK:STDOUT: %.loc25_15.1: type = value_of_initializer %int.make_type_signed.loc25 [template = constants.%i32] -// CHECK:STDOUT: %.loc25_15.2: type = converted %int.make_type_signed.loc25, %.loc25_15.1 [template = constants.%i32] // CHECK:STDOUT: %too_few.var: ref = var too_few // CHECK:STDOUT: %too_few: ref = bind_name too_few, %too_few.var // CHECK:STDOUT: %int_32.loc30: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc30: init type = call constants.%Int(%int_32.loc30) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc30: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %int_1.loc30: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc30: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %int_3.loc30: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %impl.elem0.loc30_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc30_29: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc30_29: = bound_method %int_1.loc30, %impl.elem0.loc30_29 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc30_29: = specific_function %Convert.bound.loc30_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc30_29: init %i32 = call %Convert.specific_fn.loc30_29(%int_1.loc30) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc30_29.1: %i32 = value_of_initializer %int.convert_checked.loc30_29 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc30_29.2: %i32 = converted %int_1.loc30, %.loc30_29.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc30_32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc30_32: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc30_32: = bound_method %int_2.loc30, %impl.elem0.loc30_32 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc30_32: = specific_function %Convert.bound.loc30_32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc30_32: init %i32 = call %Convert.specific_fn.loc30_32(%int_2.loc30) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc30_32.1: %i32 = value_of_initializer %int.convert_checked.loc30_32 [template = constants.%int_2.2] // CHECK:STDOUT: %.loc30_32.2: %i32 = converted %int_2.loc30, %.loc30_32.1 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc30_35: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc30_35: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc30_35: = bound_method %int_3.loc30, %impl.elem0.loc30_35 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc30_35: = specific_function %Convert.bound.loc30_35, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc30_35: init %i32 = call %Convert.specific_fn.loc30_35(%int_3.loc30) [template = constants.%int_3.2] // CHECK:STDOUT: %.loc30_35.1: %i32 = value_of_initializer %int.convert_checked.loc30_35 [template = constants.%int_3.2] // CHECK:STDOUT: %.loc30_35.2: %i32 = converted %int_3.loc30, %.loc30_35.1 [template = constants.%int_3.2] // CHECK:STDOUT: %TooMany.call: init %i32 = call %TooMany.ref(%.loc30_29.2, %.loc30_32.2, %.loc30_35.2) -// CHECK:STDOUT: %.loc30_16.1: type = value_of_initializer %int.make_type_signed.loc30 [template = constants.%i32] -// CHECK:STDOUT: %.loc30_16.2: type = converted %int.make_type_signed.loc30, %.loc30_16.1 [template = constants.%i32] // CHECK:STDOUT: %too_many.var: ref = var too_many // CHECK:STDOUT: %too_many: ref = bind_name too_many, %too_many.var // CHECK:STDOUT: %int_32.loc35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc35: init type = call constants.%Int(%int_32.loc35) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %int_1.loc35: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc35: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc35_42: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc35_42: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc35_42: = bound_method %int_1.loc35, %impl.elem0.loc35_42 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc35_42: = specific_function %Convert.bound.loc35_42, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc35_42: init %i32 = call %Convert.specific_fn.loc35_42(%int_1.loc35) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc35_42.1: %i32 = value_of_initializer %int.convert_checked.loc35_42 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc35_42.2: %i32 = converted %int_1.loc35, %.loc35_42.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc35_45: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc35_45: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc35_45: = bound_method %int_2.loc35, %impl.elem0.loc35_45 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc35_45: = specific_function %Convert.bound.loc35_45, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc35_45: init %i32 = call %Convert.specific_fn.loc35_45(%int_2.loc35) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc35_45.1: %i32 = value_of_initializer %int.convert_checked.loc35_45 [template = constants.%int_2.2] // CHECK:STDOUT: %.loc35_45.2: %i32 = converted %int_2.loc35, %.loc35_45.1 [template = constants.%int_2.2] // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%.loc35_42.2, %.loc35_45.2) -// CHECK:STDOUT: %.loc35_23.1: type = value_of_initializer %int.make_type_signed.loc35 [template = constants.%i32] -// CHECK:STDOUT: %.loc35_23.2: type = converted %int.make_type_signed.loc35, %.loc35_23.1 [template = constants.%i32] // CHECK:STDOUT: %bad_return_type.var: ref = var bad_return_type // CHECK:STDOUT: %bad_return_type: ref = bind_name bad_return_type, %bad_return_type.var // CHECK:STDOUT: %int_32.loc43: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc43: init type = call constants.%Int(%int_32.loc43) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc43: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %JustRight.ref: %JustRight.type = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] // CHECK:STDOUT: %int_1.loc43: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc43: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %int_3.loc43: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc43_16.1: type = value_of_initializer %int.make_type_signed.loc43 [template = constants.%i32] -// CHECK:STDOUT: %.loc43_16.2: type = converted %int.make_type_signed.loc43, %.loc43_16.1 [template = constants.%i32] // CHECK:STDOUT: %array_type: type = array_type , %i32 [template = ] // CHECK:STDOUT: %bad_call.var: ref = var bad_call // CHECK:STDOUT: %bad_call: ref = bind_name bad_call, %bad_call.var @@ -512,13 +462,9 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc45_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc45_25: init type = call constants.%Int(%int_32.loc45_25) [template = constants.%i32] -// CHECK:STDOUT: %.loc45_25.1: type = value_of_initializer %int.make_type_signed.loc45_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc45_25.2: type = converted %int.make_type_signed.loc45_25, %.loc45_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc45_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc45_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc45_33: init type = call constants.%Int(%int_32.loc45_33) [template = constants.%i32] -// CHECK:STDOUT: %.loc45_33.1: type = value_of_initializer %int.make_type_signed.loc45_33 [template = constants.%i32] -// CHECK:STDOUT: %.loc45_33.2: type = converted %int.make_type_signed.loc45_33, %.loc45_33.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc45_33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -535,21 +481,13 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc49_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc49_26: init type = call constants.%Int(%int_32.loc49_26) [template = constants.%i32] -// CHECK:STDOUT: %.loc49_26.1: type = value_of_initializer %int.make_type_signed.loc49_26 [template = constants.%i32] -// CHECK:STDOUT: %.loc49_26.2: type = converted %int.make_type_signed.loc49_26, %.loc49_26.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc49_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc49_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc49_34: init type = call constants.%Int(%int_32.loc49_34) [template = constants.%i32] -// CHECK:STDOUT: %.loc49_34.1: type = value_of_initializer %int.make_type_signed.loc49_34 [template = constants.%i32] -// CHECK:STDOUT: %.loc49_34.2: type = converted %int.make_type_signed.loc49_34, %.loc49_34.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc49_34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc49_42: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc49_42: init type = call constants.%Int(%int_32.loc49_42) [template = constants.%i32] -// CHECK:STDOUT: %.loc49_42.1: type = value_of_initializer %int.make_type_signed.loc49_42 [template = constants.%i32] -// CHECK:STDOUT: %.loc49_42.2: type = converted %int.make_type_signed.loc49_42, %.loc49_42.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc49_42: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc49_50: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc49_50: init type = call constants.%Int(%int_32.loc49_50) [template = constants.%i32] -// CHECK:STDOUT: %.loc49_50.1: type = value_of_initializer %int.make_type_signed.loc49_50 [template = constants.%i32] -// CHECK:STDOUT: %.loc49_50.2: type = converted %int.make_type_signed.loc49_50, %.loc49_50.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc49_50: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -568,13 +506,9 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc53_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc53_32: init type = call constants.%Int(%int_32.loc53_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc53_32.1: type = value_of_initializer %int.make_type_signed.loc53_32 [template = constants.%i32] -// CHECK:STDOUT: %.loc53_32.2: type = converted %int.make_type_signed.loc53_32, %.loc53_32.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc53_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc53_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc53_40: init type = call constants.%Int(%int_32.loc53_40) [template = constants.%i32] -// CHECK:STDOUT: %.loc53_40.1: type = value_of_initializer %int.make_type_signed.loc53_40 [template = constants.%i32] -// CHECK:STDOUT: %.loc53_40.2: type = converted %int.make_type_signed.loc53_40, %.loc53_40.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc53_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc53_48.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc53_48.2: type = converted %bool.make_type, %.loc53_48.1 [template = bool] @@ -632,25 +566,23 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Add.type: type = fn_type @Add [template] -// CHECK:STDOUT: %Add: %Add.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Add.type.1: type = fn_type @Add.1 [template] +// CHECK:STDOUT: %Add: %Add.type.1 = struct_value () [template] // CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2147483647.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_-2147483648: %i32 = int_value -2147483648 [template] @@ -659,7 +591,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -673,7 +605,7 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: .b = @__global_init.%b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Add.decl: %Add.type = fn_decl @Add [template = constants.%Add] { +// CHECK:STDOUT: %Add.decl: %Add.type.1 = fn_decl @Add.1 [template = constants.%Add] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -682,17 +614,11 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%int_32.loc4_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_signed.loc4_19, %.loc4_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -701,29 +627,25 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_signed.loc7, %.loc7_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_32.loc8) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8.2: type = converted %int.make_type_signed.loc8, %.loc8_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc8: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Add(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.uadd"; +// CHECK:STDOUT: fn @Add.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.uadd"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Add.ref.loc7: %Add.type = name_ref Add, file.%Add.decl [template = constants.%Add] +// CHECK:STDOUT: %Add.ref.loc7: %Add.type.1 = name_ref Add, file.%Add.decl [template = constants.%Add] // CHECK:STDOUT: %int_2147483647.loc7: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc7_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc7_18: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc7_18: = bound_method %int_2147483647.loc7, %impl.elem0.loc7_18 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc7_18: = specific_function %Convert.bound.loc7_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc7_18: init %i32 = call %Convert.specific_fn.loc7_18(%int_2147483647.loc7) [template = constants.%int_2147483647.2] // CHECK:STDOUT: %.loc7_18.1: %i32 = value_of_initializer %int.convert_checked.loc7_18 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %.loc7_18.2: %i32 = converted %int_2147483647.loc7, %.loc7_18.1 [template = constants.%int_2147483647.2] -// CHECK:STDOUT: %impl.elem0.loc7_30: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc7_30: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc7_30: = bound_method %int_0, %impl.elem0.loc7_30 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc7_30: = specific_function %Convert.bound.loc7_30, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc7_30: init %i32 = call %Convert.specific_fn.loc7_30(%int_0) [template = constants.%int_0.2] @@ -733,16 +655,16 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %.loc7_32.1: %i32 = value_of_initializer %int.uadd.loc7 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %.loc7_32.2: %i32 = converted %int.uadd.loc7, %.loc7_32.1 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc7_32.2 -// CHECK:STDOUT: %Add.ref.loc8: %Add.type = name_ref Add, file.%Add.decl [template = constants.%Add] +// CHECK:STDOUT: %Add.ref.loc8: %Add.type.1 = name_ref Add, file.%Add.decl [template = constants.%Add] // CHECK:STDOUT: %int_2147483647.loc8: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc8_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc8_18: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc8_18: = bound_method %int_2147483647.loc8, %impl.elem0.loc8_18 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc8_18: = specific_function %Convert.bound.loc8_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc8_18: init %i32 = call %Convert.specific_fn.loc8_18(%int_2147483647.loc8) [template = constants.%int_2147483647.2] // CHECK:STDOUT: %.loc8_18.1: %i32 = value_of_initializer %int.convert_checked.loc8_18 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %.loc8_18.2: %i32 = converted %int_2147483647.loc8, %.loc8_18.1 [template = constants.%int_2147483647.2] -// CHECK:STDOUT: %impl.elem0.loc8_30: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc8_30: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc8_30: = bound_method %int_1, %impl.elem0.loc8_30 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc8_30: = specific_function %Convert.bound.loc8_30, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc8_30: init %i32 = call %Convert.specific_fn.loc8_30(%int_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/builtins/int/udiv.carbon b/toolchain/check/testdata/builtins/int/udiv.carbon index 23a9d6f2fa28..aa6b80315153 100644 --- a/toolchain/check/testdata/builtins/int/udiv.carbon +++ b/toolchain/check/testdata/builtins/int/udiv.carbon @@ -57,30 +57,28 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Div.type: type = fn_type @Div [template] -// CHECK:STDOUT: %Div: %Div.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Div.type.1: type = fn_type @Div.1 [template] +// CHECK:STDOUT: %Div: %Div.type.1 = struct_value () [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %int_1.1: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.15 [template] -// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.11 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.3(%int_32) [template] // CHECK:STDOUT: %int_1.2: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %array_type: type = array_type %int_1.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -91,7 +89,7 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -106,7 +104,7 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Div.decl: %Div.type = fn_decl @Div [template = constants.%Div] { +// CHECK:STDOUT: %Div.decl: %Div.type.1 = fn_decl @Div.1 [template = constants.%Div] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -115,17 +113,11 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%int_32.loc2_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_signed.loc2_11, %.loc2_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%int_32.loc2_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_signed.loc2_19, %.loc2_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%int_32.loc2_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_signed.loc2_27, %.loc2_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -134,28 +126,26 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // 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: %Div.ref: %Div.type = name_ref Div, %Div.decl [template = constants.%Div] +// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %Div.ref: %Div.type.1 = name_ref Div, %Div.decl [template = constants.%Div] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_3, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_3) [template = constants.%int_3.2] // CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_3.2] // CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_3, %.loc4_20.1 [template = constants.%int_3.2] -// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_2, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_2) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_2.2] // CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_2, %.loc4_23.1 [template = constants.%int_2.2] // CHECK:STDOUT: %int.udiv: init %i32 = call %Div.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_1.1] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.udiv, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.udiv [template = constants.%int_1.1] // CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.udiv, %.loc4_24.1 [template = constants.%int_1.1] // CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_1.2] @@ -165,10 +155,8 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var // 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: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc5: type = array_type %int_1, %i32 [template = constants.%array_type] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -180,17 +168,11 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -200,11 +182,11 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Div(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.udiv"; +// CHECK:STDOUT: fn @Div.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.udiv"; // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Div.ref: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Div.ref: %Div.type.1 = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.udiv: init %i32 = call %Div.ref(%a.ref, %b.ref) @@ -225,26 +207,24 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Div.type: type = fn_type @Div [template] -// CHECK:STDOUT: %Div: %Div.type = struct_value () [template] -// CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] -// CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] -// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Div.type.1: type = fn_type @Div.1 [template] +// CHECK:STDOUT: %Div: %Div.type.1 = struct_value () [template] +// CHECK:STDOUT: %Sub.type.1: type = fn_type @Sub.1 [template] +// CHECK:STDOUT: %Sub: %Sub.type.1 = struct_value () [template] +// CHECK:STDOUT: %Negate.type.1: type = fn_type @Negate.1 [template] +// CHECK:STDOUT: %Negate: %Negate.type.1 = struct_value () [template] // CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2147483647.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] // CHECK:STDOUT: %int_-2147483647: %i32 = int_value -2147483647 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_-1: %i32 = int_value -1 [template] @@ -255,7 +235,7 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -272,7 +252,7 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: .c = @__global_init.%c // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Div.decl: %Div.type = fn_decl @Div [template = constants.%Div] { +// CHECK:STDOUT: %Div.decl: %Div.type.1 = fn_decl @Div.1 [template = constants.%Div] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -281,17 +261,11 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%int_32.loc4_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_signed.loc4_19, %.loc4_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -299,7 +273,7 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Sub.decl: %Sub.type = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %Sub.decl: %Sub.type.1 = fn_decl @Sub.1 [template = constants.%Sub] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -308,17 +282,11 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_11: init type = call constants.%Int(%int_32.loc5_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_signed.loc5_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_signed.loc5_11, %.loc5_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_19: init type = call constants.%Int(%int_32.loc5_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %int.make_type_signed.loc5_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_signed.loc5_19, %.loc5_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_27: init type = call constants.%Int(%int_32.loc5_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.1: type = value_of_initializer %int.make_type_signed.loc5_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.2: type = converted %int.make_type_signed.loc5_27, %.loc5_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -326,60 +294,50 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %Negate.decl: %Negate.type.1 = fn_decl @Negate.1 [template = constants.%Negate] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_14: init type = call constants.%Int(%int_32.loc6_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_signed.loc6_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_signed.loc6_14, %.loc6_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc6_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_22: init type = call constants.%Int(%int_32.loc6_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int.make_type_signed.loc6_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.2: type = converted %int.make_type_signed.loc6_22, %.loc6_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%int_32.loc9) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_8.1: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_8.2: type = converted %int.make_type_signed.loc9, %.loc9_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc9: type = class_type @Int, @Int(constants.%int_32) [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_8.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_signed.loc12, %.loc12_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [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: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Div(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.udiv"; +// CHECK:STDOUT: fn @Div.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.udiv"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Sub(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.usub"; +// CHECK:STDOUT: fn @Sub.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.usub"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Negate(%a.param_patt: %i32) -> %i32 = "int.unegate"; +// CHECK:STDOUT: fn @Negate.1(%a.param_patt: %i32) -> %i32 = "int.unegate"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Div.ref.loc9: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] -// CHECK:STDOUT: %Negate.ref.loc9_18: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Div.ref.loc9: %Div.type.1 = name_ref Div, file.%Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Negate.ref.loc9_18: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_2147483647.loc9: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc9_25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_25: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_25: = bound_method %int_2147483647.loc9, %impl.elem0.loc9_25 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc9_25: = specific_function %Convert.bound.loc9_25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc9_25: init %i32 = call %Convert.specific_fn.loc9_25(%int_2147483647.loc9) [template = constants.%int_2147483647.2] // CHECK:STDOUT: %.loc9_25.1: %i32 = value_of_initializer %int.convert_checked.loc9_25 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %.loc9_25.2: %i32 = converted %int_2147483647.loc9, %.loc9_25.1 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %int.unegate.loc9_36: init %i32 = call %Negate.ref.loc9_18(%.loc9_25.2) [template = constants.%int_-2147483647] -// CHECK:STDOUT: %Negate.ref.loc9_39: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc9_39: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc9_46: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_46: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_46: = bound_method %int_1.loc9, %impl.elem0.loc9_46 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc9_46: = specific_function %Convert.bound.loc9_46, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc9_46: init %i32 = call %Convert.specific_fn.loc9_46(%int_1.loc9) [template = constants.%int_1.2] @@ -394,11 +352,11 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.udiv.loc9 [template = constants.%int_0] // CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.udiv.loc9, %.loc9_49.1 [template = constants.%int_0] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc9_49.2 -// CHECK:STDOUT: %Div.ref.loc12: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] -// CHECK:STDOUT: %Sub.ref.loc12: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Div.ref.loc12: %Div.type.1 = name_ref Div, file.%Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Sub.ref.loc12: %Sub.type.1 = name_ref Sub, file.%Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc12: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_2147483647.loc12: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc12_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_29: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_29: = bound_method %int_2147483647.loc12, %impl.elem0.loc12_29 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc12_29: = specific_function %Convert.bound.loc12_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc12_29: init %i32 = call %Convert.specific_fn.loc12_29(%int_2147483647.loc12) [template = constants.%int_2147483647.2] @@ -408,7 +366,7 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %int_1.loc12_43: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc12_40.1: %i32 = value_of_initializer %int.unegate.loc12 [template = constants.%int_-2147483647] // CHECK:STDOUT: %.loc12_40.2: %i32 = converted %int.unegate.loc12, %.loc12_40.1 [template = constants.%int_-2147483647] -// CHECK:STDOUT: %impl.elem0.loc12_43: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_43: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_43: = bound_method %int_1.loc12_43, %impl.elem0.loc12_43 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc12_43: = specific_function %Convert.bound.loc12_43, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %Convert.specific_fn.loc12_43(%int_1.loc12_43) [template = constants.%int_1.2] @@ -418,7 +376,7 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %int_1.loc12_47: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc12_44.1: %i32 = value_of_initializer %int.usub.loc12 [template = constants.%int_-2147483648] // CHECK:STDOUT: %.loc12_44.2: %i32 = converted %int.usub.loc12, %.loc12_44.1 [template = constants.%int_-2147483648] -// CHECK:STDOUT: %impl.elem0.loc12_47: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_47: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_47: = bound_method %int_1.loc12_47, %impl.elem0.loc12_47 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc12_47: = specific_function %Convert.bound.loc12_47, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc12_47: init %i32 = call %Convert.specific_fn.loc12_47(%int_1.loc12_47) [template = constants.%int_1.2] @@ -428,11 +386,11 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %.loc12_49.1: %i32 = value_of_initializer %int.udiv.loc12 [template = constants.%int_-2147483648] // CHECK:STDOUT: %.loc12_49.2: %i32 = converted %int.udiv.loc12, %.loc12_49.1 [template = constants.%int_-2147483648] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc12_49.2 -// CHECK:STDOUT: %Div.ref.loc15: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] -// CHECK:STDOUT: %Sub.ref.loc15: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %Negate.ref.loc15_22: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Div.ref.loc15: %Div.type.1 = name_ref Div, file.%Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Sub.ref.loc15: %Sub.type.1 = name_ref Sub, file.%Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc15_22: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_2147483647.loc15: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc15_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc15_29: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc15_29: = bound_method %int_2147483647.loc15, %impl.elem0.loc15_29 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc15_29: = specific_function %Convert.bound.loc15_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc15_29: init %i32 = call %Convert.specific_fn.loc15_29(%int_2147483647.loc15) [template = constants.%int_2147483647.2] @@ -442,16 +400,16 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %int_1.loc15_43: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc15_40.1: %i32 = value_of_initializer %int.unegate.loc15_40 [template = constants.%int_-2147483647] // CHECK:STDOUT: %.loc15_40.2: %i32 = converted %int.unegate.loc15_40, %.loc15_40.1 [template = constants.%int_-2147483647] -// CHECK:STDOUT: %impl.elem0.loc15_43: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc15_43: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc15_43: = bound_method %int_1.loc15_43, %impl.elem0.loc15_43 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc15_43: = specific_function %Convert.bound.loc15_43, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc15_43: init %i32 = call %Convert.specific_fn.loc15_43(%int_1.loc15_43) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc15_43.1: %i32 = value_of_initializer %int.convert_checked.loc15_43 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc15_43.2: %i32 = converted %int_1.loc15_43, %.loc15_43.1 [template = constants.%int_1.2] // CHECK:STDOUT: %int.usub.loc15: init %i32 = call %Sub.ref.loc15(%.loc15_40.2, %.loc15_43.2) [template = constants.%int_-2147483648] -// CHECK:STDOUT: %Negate.ref.loc15_47: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc15_47: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_1.loc15_54: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc15_54: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc15_54: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc15_54: = bound_method %int_1.loc15_54, %impl.elem0.loc15_54 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc15_54: = specific_function %Convert.bound.loc15_54, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc15_54: init %i32 = call %Convert.specific_fn.loc15_54(%int_1.loc15_54) [template = constants.%int_1.2] @@ -473,21 +431,19 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Div.type: type = fn_type @Div [template] -// CHECK:STDOUT: %Div: %Div.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Div.type.1: type = fn_type @Div.1 [template] +// CHECK:STDOUT: %Div: %Div.type.1 = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -495,7 +451,7 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -509,7 +465,7 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: .b = @__global_init.%b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Div.decl: %Div.type = fn_decl @Div [template = constants.%Div] { +// CHECK:STDOUT: %Div.decl: %Div.type.1 = fn_decl @Div.1 [template = constants.%Div] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -518,17 +474,11 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%int_32.loc4_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_signed.loc4_19, %.loc4_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -537,29 +487,25 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc10: init type = call constants.%Int(%int_32.loc10) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8.1: type = value_of_initializer %int.make_type_signed.loc10 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8.2: type = converted %int.make_type_signed.loc10, %.loc10_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc10: type = class_type @Int, @Int(constants.%int_32) [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: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Div(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.udiv"; +// CHECK:STDOUT: fn @Div.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.udiv"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Div.ref.loc10: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Div.ref.loc10: %Div.type.1 = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_0.loc10: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc10_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc10_18: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc10_18: = bound_method %int_1, %impl.elem0.loc10_18 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc10_18: = specific_function %Convert.bound.loc10_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc10_18: init %i32 = call %Convert.specific_fn.loc10_18(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc10_18.1: %i32 = value_of_initializer %int.convert_checked.loc10_18 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc10_18.2: %i32 = converted %int_1, %.loc10_18.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc10_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc10_21: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc10_21: = bound_method %int_0.loc10, %impl.elem0.loc10_21 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc10_21: = specific_function %Convert.bound.loc10_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc10_21: init %i32 = call %Convert.specific_fn.loc10_21(%int_0.loc10) [template = constants.%int_0.2] @@ -569,16 +515,16 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %.loc10_23.1: %i32 = value_of_initializer %int.udiv.loc10 [template = ] // CHECK:STDOUT: %.loc10_23.2: %i32 = converted %int.udiv.loc10, %.loc10_23.1 [template = ] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc10_23.2 -// CHECK:STDOUT: %Div.ref.loc15: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] +// CHECK:STDOUT: %Div.ref.loc15: %Div.type.1 = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %int_0.loc15_18: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_0.loc15_21: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc15_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc15_18: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc15_18: = bound_method %int_0.loc15_18, %impl.elem0.loc15_18 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc15_18: = specific_function %Convert.bound.loc15_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc15_18: init %i32 = call %Convert.specific_fn.loc15_18(%int_0.loc15_18) [template = constants.%int_0.2] // CHECK:STDOUT: %.loc15_18.1: %i32 = value_of_initializer %int.convert_checked.loc15_18 [template = constants.%int_0.2] // CHECK:STDOUT: %.loc15_18.2: %i32 = converted %int_0.loc15_18, %.loc15_18.1 [template = constants.%int_0.2] -// CHECK:STDOUT: %impl.elem0.loc15_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc15_21: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc15_21: = bound_method %int_0.loc15_21, %impl.elem0.loc15_21 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc15_21: = specific_function %Convert.bound.loc15_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc15_21: init %i32 = call %Convert.specific_fn.loc15_21(%int_0.loc15_21) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/builtins/int/umod.carbon b/toolchain/check/testdata/builtins/int/umod.carbon index 895dfe6e16d7..4cac02d36ec5 100644 --- a/toolchain/check/testdata/builtins/int/umod.carbon +++ b/toolchain/check/testdata/builtins/int/umod.carbon @@ -59,30 +59,28 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Mod.type: type = fn_type @Mod [template] -// CHECK:STDOUT: %Mod: %Mod.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Mod.type.1: type = fn_type @Mod.1 [template] +// CHECK:STDOUT: %Mod: %Mod.type.1 = struct_value () [template] // CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_5.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %int_2.1: %i32 = int_value 2 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.15 [template] -// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.11 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.3(%int_32) [template] // CHECK:STDOUT: %int_2.2: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %array_type: type = array_type %int_2.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -93,7 +91,7 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -108,7 +106,7 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Mod.decl: %Mod.type = fn_decl @Mod [template = constants.%Mod] { +// CHECK:STDOUT: %Mod.decl: %Mod.type.1 = fn_decl @Mod.1 [template = constants.%Mod] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -117,17 +115,11 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%int_32.loc2_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_signed.loc2_11, %.loc2_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%int_32.loc2_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_signed.loc2_19, %.loc2_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%int_32.loc2_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_signed.loc2_27, %.loc2_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -136,28 +128,26 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // 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: %Mod.ref: %Mod.type = name_ref Mod, %Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %Mod.ref: %Mod.type.1 = name_ref Mod, %Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_5, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_5) [template = constants.%int_5.2] // CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_5.2] // CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_5, %.loc4_20.1 [template = constants.%int_5.2] -// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_3, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_3) [template = constants.%int_3.2] // CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_3.2] // CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_3, %.loc4_23.1 [template = constants.%int_3.2] // CHECK:STDOUT: %int.umod: init %i32 = call %Mod.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_2.1] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.umod, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.umod [template = constants.%int_2.1] // CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.umod, %.loc4_24.1 [template = constants.%int_2.1] // CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_2.2] @@ -167,10 +157,8 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var // 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: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc5: type = array_type %int_2, %i32 [template = constants.%array_type] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -182,17 +170,11 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -202,11 +184,11 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Mod(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.umod"; +// CHECK:STDOUT: fn @Mod.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.umod"; // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Mod.ref: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Mod.ref: %Mod.type.1 = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.umod: init %i32 = call %Mod.ref(%a.ref, %b.ref) @@ -227,26 +209,24 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Mod.type: type = fn_type @Mod [template] -// CHECK:STDOUT: %Mod: %Mod.type = struct_value () [template] -// CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] -// CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] -// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Mod.type.1: type = fn_type @Mod.1 [template] +// CHECK:STDOUT: %Mod: %Mod.type.1 = struct_value () [template] +// CHECK:STDOUT: %Sub.type.1: type = fn_type @Sub.1 [template] +// CHECK:STDOUT: %Sub: %Sub.type.1 = struct_value () [template] +// CHECK:STDOUT: %Negate.type.1: type = fn_type @Negate.1 [template] +// CHECK:STDOUT: %Negate: %Negate.type.1 = struct_value () [template] // CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2147483647.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] // CHECK:STDOUT: %int_-2147483647: %i32 = int_value -2147483647 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_-1: %i32 = int_value -1 [template] @@ -257,7 +237,7 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -274,7 +254,7 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: .c = @__global_init.%c // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Mod.decl: %Mod.type = fn_decl @Mod [template = constants.%Mod] { +// CHECK:STDOUT: %Mod.decl: %Mod.type.1 = fn_decl @Mod.1 [template = constants.%Mod] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -283,17 +263,11 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%int_32.loc4_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_signed.loc4_19, %.loc4_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -301,7 +275,7 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Sub.decl: %Sub.type = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %Sub.decl: %Sub.type.1 = fn_decl @Sub.1 [template = constants.%Sub] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -310,17 +284,11 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_11: init type = call constants.%Int(%int_32.loc5_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_signed.loc5_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_signed.loc5_11, %.loc5_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_19: init type = call constants.%Int(%int_32.loc5_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %int.make_type_signed.loc5_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_signed.loc5_19, %.loc5_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_27: init type = call constants.%Int(%int_32.loc5_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.1: type = value_of_initializer %int.make_type_signed.loc5_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.2: type = converted %int.make_type_signed.loc5_27, %.loc5_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -328,60 +296,50 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %Negate.decl: %Negate.type.1 = fn_decl @Negate.1 [template = constants.%Negate] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_14: init type = call constants.%Int(%int_32.loc6_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_signed.loc6_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_signed.loc6_14, %.loc6_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc6_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_22: init type = call constants.%Int(%int_32.loc6_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int.make_type_signed.loc6_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_22.2: type = converted %int.make_type_signed.loc6_22, %.loc6_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%int_32.loc9) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_8.1: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_8.2: type = converted %int.make_type_signed.loc9, %.loc9_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc9: type = class_type @Int, @Int(constants.%int_32) [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_8.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_signed.loc12, %.loc12_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [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: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Mod(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.umod"; +// CHECK:STDOUT: fn @Mod.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.umod"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Sub(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.usub"; +// CHECK:STDOUT: fn @Sub.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.usub"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Negate(%a.param_patt: %i32) -> %i32 = "int.unegate"; +// CHECK:STDOUT: fn @Negate.1(%a.param_patt: %i32) -> %i32 = "int.unegate"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Mod.ref.loc9: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] -// CHECK:STDOUT: %Negate.ref.loc9_18: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Mod.ref.loc9: %Mod.type.1 = name_ref Mod, file.%Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Negate.ref.loc9_18: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_2147483647.loc9: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc9_25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_25: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_25: = bound_method %int_2147483647.loc9, %impl.elem0.loc9_25 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc9_25: = specific_function %Convert.bound.loc9_25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc9_25: init %i32 = call %Convert.specific_fn.loc9_25(%int_2147483647.loc9) [template = constants.%int_2147483647.2] // CHECK:STDOUT: %.loc9_25.1: %i32 = value_of_initializer %int.convert_checked.loc9_25 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %.loc9_25.2: %i32 = converted %int_2147483647.loc9, %.loc9_25.1 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %int.unegate.loc9_36: init %i32 = call %Negate.ref.loc9_18(%.loc9_25.2) [template = constants.%int_-2147483647] -// CHECK:STDOUT: %Negate.ref.loc9_39: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc9_39: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc9_46: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_46: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_46: = bound_method %int_1.loc9, %impl.elem0.loc9_46 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc9_46: = specific_function %Convert.bound.loc9_46, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc9_46: init %i32 = call %Convert.specific_fn.loc9_46(%int_1.loc9) [template = constants.%int_1.2] @@ -396,11 +354,11 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.umod.loc9 [template = constants.%int_-2147483647] // CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.umod.loc9, %.loc9_49.1 [template = constants.%int_-2147483647] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc9_49.2 -// CHECK:STDOUT: %Mod.ref.loc12: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] -// CHECK:STDOUT: %Sub.ref.loc12: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Mod.ref.loc12: %Mod.type.1 = name_ref Mod, file.%Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Sub.ref.loc12: %Sub.type.1 = name_ref Sub, file.%Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc12: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_2147483647.loc12: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc12_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_29: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_29: = bound_method %int_2147483647.loc12, %impl.elem0.loc12_29 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc12_29: = specific_function %Convert.bound.loc12_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc12_29: init %i32 = call %Convert.specific_fn.loc12_29(%int_2147483647.loc12) [template = constants.%int_2147483647.2] @@ -410,7 +368,7 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %int_1.loc12_43: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc12_40.1: %i32 = value_of_initializer %int.unegate.loc12 [template = constants.%int_-2147483647] // CHECK:STDOUT: %.loc12_40.2: %i32 = converted %int.unegate.loc12, %.loc12_40.1 [template = constants.%int_-2147483647] -// CHECK:STDOUT: %impl.elem0.loc12_43: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_43: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_43: = bound_method %int_1.loc12_43, %impl.elem0.loc12_43 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc12_43: = specific_function %Convert.bound.loc12_43, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %Convert.specific_fn.loc12_43(%int_1.loc12_43) [template = constants.%int_1.2] @@ -420,7 +378,7 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %int_1.loc12_47: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc12_44.1: %i32 = value_of_initializer %int.usub.loc12 [template = constants.%int_-2147483648] // CHECK:STDOUT: %.loc12_44.2: %i32 = converted %int.usub.loc12, %.loc12_44.1 [template = constants.%int_-2147483648] -// CHECK:STDOUT: %impl.elem0.loc12_47: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_47: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_47: = bound_method %int_1.loc12_47, %impl.elem0.loc12_47 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc12_47: = specific_function %Convert.bound.loc12_47, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc12_47: init %i32 = call %Convert.specific_fn.loc12_47(%int_1.loc12_47) [template = constants.%int_1.2] @@ -430,11 +388,11 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %.loc12_49.1: %i32 = value_of_initializer %int.umod.loc12 [template = constants.%int_0] // CHECK:STDOUT: %.loc12_49.2: %i32 = converted %int.umod.loc12, %.loc12_49.1 [template = constants.%int_0] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc12_49.2 -// CHECK:STDOUT: %Mod.ref.loc15: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] -// CHECK:STDOUT: %Sub.ref.loc15: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %Negate.ref.loc15_22: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Mod.ref.loc15: %Mod.type.1 = name_ref Mod, file.%Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Sub.ref.loc15: %Sub.type.1 = name_ref Sub, file.%Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc15_22: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_2147483647.loc15: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc15_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc15_29: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc15_29: = bound_method %int_2147483647.loc15, %impl.elem0.loc15_29 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc15_29: = specific_function %Convert.bound.loc15_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc15_29: init %i32 = call %Convert.specific_fn.loc15_29(%int_2147483647.loc15) [template = constants.%int_2147483647.2] @@ -444,16 +402,16 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %int_1.loc15_43: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc15_40.1: %i32 = value_of_initializer %int.unegate.loc15_40 [template = constants.%int_-2147483647] // CHECK:STDOUT: %.loc15_40.2: %i32 = converted %int.unegate.loc15_40, %.loc15_40.1 [template = constants.%int_-2147483647] -// CHECK:STDOUT: %impl.elem0.loc15_43: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc15_43: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc15_43: = bound_method %int_1.loc15_43, %impl.elem0.loc15_43 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc15_43: = specific_function %Convert.bound.loc15_43, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc15_43: init %i32 = call %Convert.specific_fn.loc15_43(%int_1.loc15_43) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc15_43.1: %i32 = value_of_initializer %int.convert_checked.loc15_43 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc15_43.2: %i32 = converted %int_1.loc15_43, %.loc15_43.1 [template = constants.%int_1.2] // CHECK:STDOUT: %int.usub.loc15: init %i32 = call %Sub.ref.loc15(%.loc15_40.2, %.loc15_43.2) [template = constants.%int_-2147483648] -// CHECK:STDOUT: %Negate.ref.loc15_47: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc15_47: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_1.loc15_54: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc15_54: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc15_54: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc15_54: = bound_method %int_1.loc15_54, %impl.elem0.loc15_54 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc15_54: = specific_function %Convert.bound.loc15_54, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc15_54: init %i32 = call %Convert.specific_fn.loc15_54(%int_1.loc15_54) [template = constants.%int_1.2] @@ -475,21 +433,19 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Mod.type: type = fn_type @Mod [template] -// CHECK:STDOUT: %Mod: %Mod.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Mod.type.1: type = fn_type @Mod.1 [template] +// CHECK:STDOUT: %Mod: %Mod.type.1 = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -497,7 +453,7 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -511,7 +467,7 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: .b = @__global_init.%b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Mod.decl: %Mod.type = fn_decl @Mod [template = constants.%Mod] { +// CHECK:STDOUT: %Mod.decl: %Mod.type.1 = fn_decl @Mod.1 [template = constants.%Mod] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -520,17 +476,11 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%int_32.loc4_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_signed.loc4_19, %.loc4_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -539,29 +489,25 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // 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_8.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_signed.loc12, %.loc12_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%int_32.loc17) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_8.1: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_8.2: type = converted %int.make_type_signed.loc17, %.loc17_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Mod(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.umod"; +// CHECK:STDOUT: fn @Mod.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.umod"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Mod.ref.loc12: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Mod.ref.loc12: %Mod.type.1 = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_0.loc12: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc12_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_18: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_18: = bound_method %int_1, %impl.elem0.loc12_18 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc12_18: = specific_function %Convert.bound.loc12_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc12_18: init %i32 = call %Convert.specific_fn.loc12_18(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc12_18.1: %i32 = value_of_initializer %int.convert_checked.loc12_18 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc12_18.2: %i32 = converted %int_1, %.loc12_18.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc12_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_21: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_21: = bound_method %int_0.loc12, %impl.elem0.loc12_21 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc12_21: = specific_function %Convert.bound.loc12_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc12_21: init %i32 = call %Convert.specific_fn.loc12_21(%int_0.loc12) [template = constants.%int_0.2] @@ -571,16 +517,16 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %.loc12_23.1: %i32 = value_of_initializer %int.umod.loc12 [template = ] // CHECK:STDOUT: %.loc12_23.2: %i32 = converted %int.umod.loc12, %.loc12_23.1 [template = ] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc12_23.2 -// CHECK:STDOUT: %Mod.ref.loc17: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] +// CHECK:STDOUT: %Mod.ref.loc17: %Mod.type.1 = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %int_0.loc17_18: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_0.loc17_21: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc17_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc17_18: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc17_18: = bound_method %int_0.loc17_18, %impl.elem0.loc17_18 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc17_18: = specific_function %Convert.bound.loc17_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc17_18: init %i32 = call %Convert.specific_fn.loc17_18(%int_0.loc17_18) [template = constants.%int_0.2] // CHECK:STDOUT: %.loc17_18.1: %i32 = value_of_initializer %int.convert_checked.loc17_18 [template = constants.%int_0.2] // CHECK:STDOUT: %.loc17_18.2: %i32 = converted %int_0.loc17_18, %.loc17_18.1 [template = constants.%int_0.2] -// CHECK:STDOUT: %impl.elem0.loc17_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc17_21: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc17_21: = bound_method %int_0.loc17_21, %impl.elem0.loc17_21 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc17_21: = specific_function %Convert.bound.loc17_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc17_21: init %i32 = call %Convert.specific_fn.loc17_21(%int_0.loc17_21) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/builtins/int/umul.carbon b/toolchain/check/testdata/builtins/int/umul.carbon index 55394d1ac5cb..87eff36d2ee5 100644 --- a/toolchain/check/testdata/builtins/int/umul.carbon +++ b/toolchain/check/testdata/builtins/int/umul.carbon @@ -32,30 +32,28 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Mul.type: type = fn_type @Mul [template] -// CHECK:STDOUT: %Mul: %Mul.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Mul.type.1: type = fn_type @Mul.1 [template] +// CHECK:STDOUT: %Mul: %Mul.type.1 = struct_value () [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %int_6.1: %i32 = int_value 6 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_6.1, %Convert.15 [template] -// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_6.1, %Convert.11 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.3(%int_32) [template] // CHECK:STDOUT: %int_6.2: Core.IntLiteral = int_value 6 [template] // CHECK:STDOUT: %array_type: type = array_type %int_6.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -66,7 +64,7 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -81,7 +79,7 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Mul.decl: %Mul.type = fn_decl @Mul [template = constants.%Mul] { +// CHECK:STDOUT: %Mul.decl: %Mul.type.1 = fn_decl @Mul.1 [template = constants.%Mul] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -90,17 +88,11 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%int_32.loc2_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_signed.loc2_11, %.loc2_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%int_32.loc2_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_signed.loc2_19, %.loc2_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%int_32.loc2_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_signed.loc2_27, %.loc2_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -109,28 +101,26 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // 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: %Mul.ref: %Mul.type = name_ref Mul, %Mul.decl [template = constants.%Mul] +// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %Mul.ref: %Mul.type.1 = name_ref Mul, %Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_3, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_3) [template = constants.%int_3.2] // CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_3.2] // CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_3, %.loc4_20.1 [template = constants.%int_3.2] -// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_2, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_2) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_2.2] // CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_2, %.loc4_23.1 [template = constants.%int_2.2] // CHECK:STDOUT: %int.umul: init %i32 = call %Mul.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_6.1] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.umul, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.umul [template = constants.%int_6.1] // CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.umul, %.loc4_24.1 [template = constants.%int_6.1] // CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_6.2] @@ -140,10 +130,8 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var // 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: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.2] -// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc5: type = array_type %int_6, %i32 [template = constants.%array_type] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -155,17 +143,11 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -175,11 +157,11 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Mul(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.umul"; +// CHECK:STDOUT: fn @Mul.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.umul"; // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Mul.ref: %Mul.type = name_ref Mul, file.%Mul.decl [template = constants.%Mul] +// CHECK:STDOUT: %Mul.ref: %Mul.type.1 = name_ref Mul, file.%Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.umul: init %i32 = call %Mul.ref(%a.ref, %b.ref) @@ -200,26 +182,24 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Mul.type: type = fn_type @Mul [template] -// CHECK:STDOUT: %Mul: %Mul.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Mul.type.1: type = fn_type @Mul.1 [template] +// CHECK:STDOUT: %Mul: %Mul.type.1 = struct_value () [template] // CHECK:STDOUT: %int_32767.1: Core.IntLiteral = int_value 32767 [template] // CHECK:STDOUT: %int_65536.1: Core.IntLiteral = int_value 65536 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_32767.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_32767.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_32767.2: %i32 = int_value 32767 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_65536.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_65536.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_65536.2: %i32 = int_value 65536 [template] // CHECK:STDOUT: %int_2147418112: %i32 = int_value 2147418112 [template] // CHECK:STDOUT: %int_32768.1: Core.IntLiteral = int_value 32768 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_32768.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_32768.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_32768.2: %i32 = int_value 32768 [template] // CHECK:STDOUT: %int_-2147483648: %i32 = int_value -2147483648 [template] @@ -228,7 +208,7 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -242,7 +222,7 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: .b = @__global_init.%b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Mul.decl: %Mul.type = fn_decl @Mul [template = constants.%Mul] { +// CHECK:STDOUT: %Mul.decl: %Mul.type.1 = fn_decl @Mul.1 [template = constants.%Mul] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -251,17 +231,11 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%int_32.loc4_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_signed.loc4_19, %.loc4_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -270,29 +244,25 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_signed.loc6, %.loc6_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_signed.loc7, %.loc7_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Mul(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.umul"; +// CHECK:STDOUT: fn @Mul.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.umul"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Mul.ref.loc6: %Mul.type = name_ref Mul, file.%Mul.decl [template = constants.%Mul] +// CHECK:STDOUT: %Mul.ref.loc6: %Mul.type.1 = name_ref Mul, file.%Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %int_32767: Core.IntLiteral = int_value 32767 [template = constants.%int_32767.1] // CHECK:STDOUT: %int_65536.loc6: Core.IntLiteral = int_value 65536 [template = constants.%int_65536.1] -// CHECK:STDOUT: %impl.elem0.loc6_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc6_18: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc6_18: = bound_method %int_32767, %impl.elem0.loc6_18 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc6_18: = specific_function %Convert.bound.loc6_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc6_18: init %i32 = call %Convert.specific_fn.loc6_18(%int_32767) [template = constants.%int_32767.2] // CHECK:STDOUT: %.loc6_18.1: %i32 = value_of_initializer %int.convert_checked.loc6_18 [template = constants.%int_32767.2] // CHECK:STDOUT: %.loc6_18.2: %i32 = converted %int_32767, %.loc6_18.1 [template = constants.%int_32767.2] -// CHECK:STDOUT: %impl.elem0.loc6_26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc6_26: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc6_26: = bound_method %int_65536.loc6, %impl.elem0.loc6_26 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc6_26: = specific_function %Convert.bound.loc6_26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc6_26: init %i32 = call %Convert.specific_fn.loc6_26(%int_65536.loc6) [template = constants.%int_65536.2] @@ -302,16 +272,16 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %.loc6_34.1: %i32 = value_of_initializer %int.umul.loc6 [template = constants.%int_2147418112] // CHECK:STDOUT: %.loc6_34.2: %i32 = converted %int.umul.loc6, %.loc6_34.1 [template = constants.%int_2147418112] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc6_34.2 -// CHECK:STDOUT: %Mul.ref.loc7: %Mul.type = name_ref Mul, file.%Mul.decl [template = constants.%Mul] +// CHECK:STDOUT: %Mul.ref.loc7: %Mul.type.1 = name_ref Mul, file.%Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %int_32768: Core.IntLiteral = int_value 32768 [template = constants.%int_32768.1] // CHECK:STDOUT: %int_65536.loc7: Core.IntLiteral = int_value 65536 [template = constants.%int_65536.1] -// CHECK:STDOUT: %impl.elem0.loc7_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc7_18: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc7_18: = bound_method %int_32768, %impl.elem0.loc7_18 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc7_18: = specific_function %Convert.bound.loc7_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc7_18: init %i32 = call %Convert.specific_fn.loc7_18(%int_32768) [template = constants.%int_32768.2] // CHECK:STDOUT: %.loc7_18.1: %i32 = value_of_initializer %int.convert_checked.loc7_18 [template = constants.%int_32768.2] // CHECK:STDOUT: %.loc7_18.2: %i32 = converted %int_32768, %.loc7_18.1 [template = constants.%int_32768.2] -// CHECK:STDOUT: %impl.elem0.loc7_26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc7_26: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc7_26: = bound_method %int_65536.loc7, %impl.elem0.loc7_26 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc7_26: = specific_function %Convert.bound.loc7_26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc7_26: init %i32 = call %Convert.specific_fn.loc7_26(%int_65536.loc7) [template = constants.%int_65536.2] diff --git a/toolchain/check/testdata/builtins/int/unegate.carbon b/toolchain/check/testdata/builtins/int/unegate.carbon index 64b29a835526..ac618441a9b3 100644 --- a/toolchain/check/testdata/builtins/int/unegate.carbon +++ b/toolchain/check/testdata/builtins/int/unegate.carbon @@ -116,30 +116,28 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Negate.type.1: type = fn_type @Negate.1 [template] +// CHECK:STDOUT: %Negate: %Negate.type.1 = struct_value () [template] // CHECK:STDOUT: %int_123.1: Core.IntLiteral = int_value 123 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_123.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_123.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_123.2: %i32 = int_value 123 [template] // CHECK:STDOUT: %int_-123: %i32 = int_value -123 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_123.2, %Convert.15 [template] -// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_123.2, %Convert.11 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.3(%int_32) [template] // CHECK:STDOUT: %array_type: type = array_type %int_123.1, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_-1: %i32 = int_value -1 [template] @@ -150,7 +148,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -166,31 +164,27 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %Negate.decl: %Negate.type.1 = fn_decl @Negate.1 [template = constants.%Negate] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc2_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_14: init type = call constants.%Int(%int_32.loc2_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_14.1: type = value_of_initializer %int.make_type_signed.loc2_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_14.2: type = converted %int.make_type_signed.loc2_14, %.loc2_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_22: init type = call constants.%Int(%int_32.loc2_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_22.1: type = value_of_initializer %int.make_type_signed.loc2_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_22.2: type = converted %int.make_type_signed.loc2_22, %.loc2_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // 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: %Negate.ref.loc4_16: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %Negate.ref.loc4_23: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %Negate.ref.loc4_16: %Negate.type.1 = name_ref Negate, %Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc4_23: %Negate.type.1 = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_123.loc4: Core.IntLiteral = int_value 123 [template = constants.%int_123.1] -// CHECK:STDOUT: %impl.elem0.loc4_30: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_30: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_30: = bound_method %int_123.loc4, %impl.elem0.loc4_30 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc4_30: = specific_function %Convert.bound.loc4_30, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc4_30: init %i32 = call %Convert.specific_fn.loc4_30(%int_123.loc4) [template = constants.%int_123.2] @@ -200,11 +194,9 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %.loc4_33.1: %i32 = value_of_initializer %int.unegate.loc4_33 [template = constants.%int_-123] // CHECK:STDOUT: %.loc4_33.2: %i32 = converted %int.unegate.loc4_33, %.loc4_33.1 [template = constants.%int_-123] // CHECK:STDOUT: %int.unegate.loc4_34: init %i32 = call %Negate.ref.loc4_16(%.loc4_33.2) [template = constants.%int_123.2] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc4_34: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %impl.elem0.loc4_34: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc4_34: = bound_method %int.unegate.loc4_34, %impl.elem0.loc4_34 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc4_34: = specific_function %Convert.bound.loc4_34, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %Convert.specific_fn.loc4_34: = specific_function %Convert.bound.loc4_34, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %.loc4_34.1: %i32 = value_of_initializer %int.unegate.loc4_34 [template = constants.%int_123.2] // CHECK:STDOUT: %.loc4_34.2: %i32 = converted %int.unegate.loc4_34, %.loc4_34.1 [template = constants.%int_123.2] // CHECK:STDOUT: %int.convert_checked.loc4_34: init Core.IntLiteral = call %Convert.specific_fn.loc4_34(%.loc4_34.2) [template = constants.%int_123.1] @@ -214,16 +206,12 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var // 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: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_123.loc5: Core.IntLiteral = int_value 123 [template = constants.%int_123.1] -// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc5: type = array_type %int_123.loc5, %i32 [template = constants.%array_type] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_signed.loc7, %.loc7_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -233,17 +221,11 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc9_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc9_19: init type = call constants.%Int(%int_32.loc9_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_19.1: type = value_of_initializer %int.make_type_signed.loc9_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_19.2: type = converted %int.make_type_signed.loc9_19, %.loc9_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc9_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc9_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc9_27: init type = call constants.%Int(%int_32.loc9_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_27.1: type = value_of_initializer %int.make_type_signed.loc9_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_27.2: type = converted %int.make_type_signed.loc9_27, %.loc9_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc9_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc9_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc9_35: init type = call constants.%Int(%int_32.loc9_35) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_35.1: type = value_of_initializer %int.make_type_signed.loc9_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_35.2: type = converted %int.make_type_signed.loc9_35, %.loc9_35.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc9_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -253,11 +235,11 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Negate(%a.param_patt: %i32) -> %i32 = "int.unegate"; +// CHECK:STDOUT: fn @Negate.1(%a.param_patt: %i32) -> %i32 = "int.unegate"; // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %int.unegate: init %i32 = call %Negate.ref(%a.ref) // CHECK:STDOUT: %.loc10_19.1: %i32 = value_of_initializer %int.unegate @@ -270,9 +252,9 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %arr.ref: ref %array_type = name_ref arr, file.%arr // CHECK:STDOUT: %addr: %ptr = addr_of %arr.ref // CHECK:STDOUT: %arr_p: %ptr = bind_name arr_p, %addr -// CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] @@ -289,9 +271,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %TooFew.type: type = fn_type @TooFew [template] // CHECK:STDOUT: %TooFew: %TooFew.type = struct_value () [template] // CHECK:STDOUT: %TooMany.type: type = fn_type @TooMany [template] @@ -305,13 +285,13 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] @@ -325,8 +305,8 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .Bool = %import_ref.2 -// CHECK:STDOUT: .ImplicitAs = %import_ref.3 +// CHECK:STDOUT: .Bool = %import_ref.5 +// CHECK:STDOUT: .ImplicitAs = %import_ref.6 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -353,9 +333,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc8_16.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_16.2: type = converted %int.make_type_signed, %.loc8_16.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -368,17 +346,11 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc13_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_15: init type = call constants.%Int(%int_32.loc13_15) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %int.make_type_signed.loc13_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_15.2: type = converted %int.make_type_signed.loc13_15, %.loc13_15.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_23: init type = call constants.%Int(%int_32.loc13_23) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %int.make_type_signed.loc13_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.2: type = converted %int.make_type_signed.loc13_23, %.loc13_23.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_31: init type = call constants.%Int(%int_32.loc13_31) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %int.make_type_signed.loc13_31 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.2: type = converted %int.make_type_signed.loc13_31, %.loc13_31.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_31: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -393,9 +365,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // 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: %.loc18_21.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc18_21.2: type = converted %int.make_type_signed, %.loc18_21.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc18_29.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc18_29.2: type = converted %bool.make_type, %.loc18_29.1 [template = bool] @@ -411,70 +381,58 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc19_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc19_17: init type = call constants.%Int(%int_32.loc19_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_17.1: type = value_of_initializer %int.make_type_signed.loc19_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_17.2: type = converted %int.make_type_signed.loc19_17, %.loc19_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc19_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc19_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc19_25: init type = call constants.%Int(%int_32.loc19_25) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_25.1: type = value_of_initializer %int.make_type_signed.loc19_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_25.2: type = converted %int.make_type_signed.loc19_25, %.loc19_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc19_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %int_32.loc25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc25: init type = call constants.%Int(%int_32.loc25) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, %TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %TooFew.call: init %i32 = call %TooFew.ref() -// CHECK:STDOUT: %.loc25_15.1: type = value_of_initializer %int.make_type_signed.loc25 [template = constants.%i32] -// CHECK:STDOUT: %.loc25_15.2: type = converted %int.make_type_signed.loc25, %.loc25_15.1 [template = constants.%i32] // CHECK:STDOUT: %too_few.var: ref = var too_few // CHECK:STDOUT: %too_few: ref = bind_name too_few, %too_few.var // CHECK:STDOUT: %int_32.loc30: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc30: init type = call constants.%Int(%int_32.loc30) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc30: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %int_1.loc30: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc30: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc30_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc30_29: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc30_29: = bound_method %int_1.loc30, %impl.elem0.loc30_29 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc30_29: = specific_function %Convert.bound.loc30_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc30_29: init %i32 = call %Convert.specific_fn.loc30_29(%int_1.loc30) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc30_29.1: %i32 = value_of_initializer %int.convert_checked.loc30_29 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc30_29.2: %i32 = converted %int_1.loc30, %.loc30_29.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc30_32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc30_32: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc30_32: = bound_method %int_2.loc30, %impl.elem0.loc30_32 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc30_32: = specific_function %Convert.bound.loc30_32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc30_32: init %i32 = call %Convert.specific_fn.loc30_32(%int_2.loc30) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc30_32.1: %i32 = value_of_initializer %int.convert_checked.loc30_32 [template = constants.%int_2.2] // CHECK:STDOUT: %.loc30_32.2: %i32 = converted %int_2.loc30, %.loc30_32.1 [template = constants.%int_2.2] // CHECK:STDOUT: %TooMany.call: init %i32 = call %TooMany.ref(%.loc30_29.2, %.loc30_32.2) -// CHECK:STDOUT: %.loc30_16.1: type = value_of_initializer %int.make_type_signed.loc30 [template = constants.%i32] -// CHECK:STDOUT: %.loc30_16.2: type = converted %int.make_type_signed.loc30, %.loc30_16.1 [template = constants.%i32] // CHECK:STDOUT: %too_many.var: ref = var too_many // CHECK:STDOUT: %too_many: ref = bind_name too_many, %too_many.var // CHECK:STDOUT: %int_32.loc35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc35: init type = call constants.%Int(%int_32.loc35) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %int_1.loc35: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc35: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc35: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc35: = bound_method %int_1.loc35, %impl.elem0.loc35 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc35: = specific_function %Convert.bound.loc35, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc35: init %i32 = call %Convert.specific_fn.loc35(%int_1.loc35) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc35_42.1: %i32 = value_of_initializer %int.convert_checked.loc35 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc35_42.2: %i32 = converted %int_1.loc35, %.loc35_42.1 [template = constants.%int_1.2] // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%.loc35_42.2) -// CHECK:STDOUT: %.loc35_23.1: type = value_of_initializer %int.make_type_signed.loc35 [template = constants.%i32] -// CHECK:STDOUT: %.loc35_23.2: type = converted %int.make_type_signed.loc35, %.loc35_23.1 [template = constants.%i32] // CHECK:STDOUT: %bad_return_type.var: ref = var bad_return_type // CHECK:STDOUT: %bad_return_type: ref = bind_name bad_return_type, %bad_return_type.var // CHECK:STDOUT: %int_32.loc44: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc44: init type = call constants.%Int(%int_32.loc44) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc44: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %JustRight.ref: %JustRight.type = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] // CHECK:STDOUT: %int_1.loc44: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc44: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %.loc44_16.1: type = value_of_initializer %int.make_type_signed.loc44 [template = constants.%i32] -// CHECK:STDOUT: %.loc44_16.2: type = converted %int.make_type_signed.loc44, %.loc44_16.1 [template = constants.%i32] // CHECK:STDOUT: %array_type: type = array_type , %i32 [template = ] // CHECK:STDOUT: %bad_call.var: ref = var bad_call // CHECK:STDOUT: %bad_call: ref = bind_name bad_call, %bad_call.var @@ -485,13 +443,9 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc46_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc46_25: init type = call constants.%Int(%int_32.loc46_25) [template = constants.%i32] -// CHECK:STDOUT: %.loc46_25.1: type = value_of_initializer %int.make_type_signed.loc46_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc46_25.2: type = converted %int.make_type_signed.loc46_25, %.loc46_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc46_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc46_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc46_33: init type = call constants.%Int(%int_32.loc46_33) [template = constants.%i32] -// CHECK:STDOUT: %.loc46_33.1: type = value_of_initializer %int.make_type_signed.loc46_33 [template = constants.%i32] -// CHECK:STDOUT: %.loc46_33.2: type = converted %int.make_type_signed.loc46_33, %.loc46_33.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc46_33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -508,21 +462,13 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc57_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc57_26: init type = call constants.%Int(%int_32.loc57_26) [template = constants.%i32] -// CHECK:STDOUT: %.loc57_26.1: type = value_of_initializer %int.make_type_signed.loc57_26 [template = constants.%i32] -// CHECK:STDOUT: %.loc57_26.2: type = converted %int.make_type_signed.loc57_26, %.loc57_26.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc57_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc57_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc57_34: init type = call constants.%Int(%int_32.loc57_34) [template = constants.%i32] -// CHECK:STDOUT: %.loc57_34.1: type = value_of_initializer %int.make_type_signed.loc57_34 [template = constants.%i32] -// CHECK:STDOUT: %.loc57_34.2: type = converted %int.make_type_signed.loc57_34, %.loc57_34.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc57_34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc57_42: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc57_42: init type = call constants.%Int(%int_32.loc57_42) [template = constants.%i32] -// CHECK:STDOUT: %.loc57_42.1: type = value_of_initializer %int.make_type_signed.loc57_42 [template = constants.%i32] -// CHECK:STDOUT: %.loc57_42.2: type = converted %int.make_type_signed.loc57_42, %.loc57_42.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc57_42: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc57_50: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc57_50: init type = call constants.%Int(%int_32.loc57_50) [template = constants.%i32] -// CHECK:STDOUT: %.loc57_50.1: type = value_of_initializer %int.make_type_signed.loc57_50 [template = constants.%i32] -// CHECK:STDOUT: %.loc57_50.2: type = converted %int.make_type_signed.loc57_50, %.loc57_50.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc57_50: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -541,13 +487,9 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc68_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc68_32: init type = call constants.%Int(%int_32.loc68_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc68_32.1: type = value_of_initializer %int.make_type_signed.loc68_32 [template = constants.%i32] -// CHECK:STDOUT: %.loc68_32.2: type = converted %int.make_type_signed.loc68_32, %.loc68_32.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc68_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc68_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc68_40: init type = call constants.%Int(%int_32.loc68_40) [template = constants.%i32] -// CHECK:STDOUT: %.loc68_40.1: type = value_of_initializer %int.make_type_signed.loc68_40 [template = constants.%i32] -// CHECK:STDOUT: %.loc68_40.2: type = converted %int.make_type_signed.loc68_40, %.loc68_40.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc68_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc68_48.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc68_48.2: type = converted %bool.make_type, %.loc68_48.1 [template = bool] @@ -596,24 +538,22 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Negate.type: type = fn_type @Negate [template] -// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template] -// CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] -// CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Negate.type.1: type = fn_type @Negate.1 [template] +// CHECK:STDOUT: %Negate: %Negate.type.1 = struct_value () [template] +// CHECK:STDOUT: %Sub.type.1: type = fn_type @Sub.1 [template] +// CHECK:STDOUT: %Sub: %Sub.type.1 = struct_value () [template] // CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2147483647.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] // CHECK:STDOUT: %int_-2147483647: %i32 = int_value -2147483647 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_-2147483648: %i32 = int_value -2147483648 [template] @@ -622,7 +562,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -637,26 +577,22 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: .b = @__global_init.%b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Negate.decl: %Negate.type = fn_decl @Negate [template = constants.%Negate] { +// CHECK:STDOUT: %Negate.decl: %Negate.type.1 = fn_decl @Negate.1 [template = constants.%Negate] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc4_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_14: init type = call constants.%Int(%int_32.loc4_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_14.1: type = value_of_initializer %int.make_type_signed.loc4_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_14.2: type = converted %int.make_type_signed.loc4_14, %.loc4_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_22: init type = call constants.%Int(%int_32.loc4_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_22.1: type = value_of_initializer %int.make_type_signed.loc4_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_22.2: type = converted %int.make_type_signed.loc4_22, %.loc4_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Sub.decl: %Sub.type = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %Sub.decl: %Sub.type.1 = fn_decl @Sub.1 [template = constants.%Sub] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -665,17 +601,11 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_11: init type = call constants.%Int(%int_32.loc5_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_11.1: type = value_of_initializer %int.make_type_signed.loc5_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_signed.loc5_11, %.loc5_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_19: init type = call constants.%Int(%int_32.loc5_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %int.make_type_signed.loc5_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_signed.loc5_19, %.loc5_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_27: init type = call constants.%Int(%int_32.loc5_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.1: type = value_of_initializer %int.make_type_signed.loc5_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_27.2: type = converted %int.make_type_signed.loc5_27, %.loc5_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -684,25 +614,21 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_32.loc8) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8.2: type = converted %int.make_type_signed.loc8, %.loc8_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc8: type = class_type @Int, @Int(constants.%int_32) [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_8.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_8.2: type = converted %int.make_type_signed.loc11, %.loc11_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Negate(%a.param_patt: %i32) -> %i32 = "int.unegate"; +// CHECK:STDOUT: fn @Negate.1(%a.param_patt: %i32) -> %i32 = "int.unegate"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Sub(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.usub"; +// CHECK:STDOUT: fn @Sub.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.usub"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Negate.ref.loc8_14: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %Negate.ref.loc8_21: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc8_14: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc8_21: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_2147483647.loc8: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc8: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc8: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc8: = bound_method %int_2147483647.loc8, %impl.elem0.loc8 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc8: = specific_function %Convert.bound.loc8, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %Convert.specific_fn.loc8(%int_2147483647.loc8) [template = constants.%int_2147483647.2] @@ -715,11 +641,11 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %.loc8_40.1: %i32 = value_of_initializer %int.unegate.loc8_39 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %.loc8_40.2: %i32 = converted %int.unegate.loc8_39, %.loc8_40.1 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc8_40.2 -// CHECK:STDOUT: %Negate.ref.loc11_14: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %Sub.ref: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %Negate.ref.loc11_25: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Negate.ref.loc11_14: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] +// CHECK:STDOUT: %Sub.ref: %Sub.type.1 = name_ref Sub, file.%Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Negate.ref.loc11_25: %Negate.type.1 = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %int_2147483647.loc11: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc11_32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_32: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_32: = bound_method %int_2147483647.loc11, %impl.elem0.loc11_32 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_32: = specific_function %Convert.bound.loc11_32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_32: init %i32 = call %Convert.specific_fn.loc11_32(%int_2147483647.loc11) [template = constants.%int_2147483647.2] @@ -729,7 +655,7 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc11_42.1: %i32 = value_of_initializer %int.unegate.loc11_42 [template = constants.%int_-2147483647] // CHECK:STDOUT: %.loc11_42.2: %i32 = converted %int.unegate.loc11_42, %.loc11_42.1 [template = constants.%int_-2147483647] -// CHECK:STDOUT: %impl.elem0.loc11_45: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_45: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_45: = bound_method %int_1, %impl.elem0.loc11_45 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_45: = specific_function %Convert.bound.loc11_45, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_45: init %i32 = call %Convert.specific_fn.loc11_45(%int_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/builtins/int/usub.carbon b/toolchain/check/testdata/builtins/int/usub.carbon index 613188df4255..3e2f4fcdee5e 100644 --- a/toolchain/check/testdata/builtins/int/usub.carbon +++ b/toolchain/check/testdata/builtins/int/usub.carbon @@ -33,30 +33,28 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] -// CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Sub.type.1: type = fn_type @Sub.1 [template] +// CHECK:STDOUT: %Sub: %Sub.type.1 = struct_value () [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %int_1.1: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.15 [template] -// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.11 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.3(%int_32) [template] // CHECK:STDOUT: %int_1.2: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %array_type: type = array_type %int_1.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -67,7 +65,7 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -82,7 +80,7 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: .RuntimeCall = %RuntimeCall.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Sub.decl: %Sub.type = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %Sub.decl: %Sub.type.1 = fn_decl @Sub.1 [template = constants.%Sub] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -91,17 +89,11 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%int_32.loc2_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_signed.loc2_11, %.loc2_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%int_32.loc2_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_signed.loc2_19, %.loc2_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%int_32.loc2_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_signed.loc2_27, %.loc2_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -110,28 +102,26 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // 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: %Sub.ref: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %Sub.ref: %Sub.type.1 = name_ref Sub, %Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_3, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_3) [template = constants.%int_3.2] // CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_3.2] // CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_3, %.loc4_20.1 [template = constants.%int_3.2] -// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_2, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_2) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_2.2] // CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_2, %.loc4_23.1 [template = constants.%int_2.2] // CHECK:STDOUT: %int.usub: init %i32 = call %Sub.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_1.1] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.usub, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.usub [template = constants.%int_1.1] // CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.usub, %.loc4_24.1 [template = constants.%int_1.1] // CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_1.2] @@ -141,10 +131,8 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var // 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: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc5: type = array_type %int_1, %i32 [template = constants.%array_type] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -156,17 +144,11 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -176,11 +158,11 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Sub(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.usub"; +// CHECK:STDOUT: fn @Sub.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.usub"; // CHECK:STDOUT: // CHECK:STDOUT: fn @RuntimeCall(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Sub.ref: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref: %Sub.type.1 = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b // CHECK:STDOUT: %int.usub: init %i32 = call %Sub.ref(%a.ref, %b.ref) @@ -201,31 +183,29 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Sub.type: type = fn_type @Sub [template] -// CHECK:STDOUT: %Sub: %Sub.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Sub.type.1: type = fn_type @Sub.1 [template] +// CHECK:STDOUT: %Sub: %Sub.type.1 = struct_value () [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2147483647.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] // CHECK:STDOUT: %int_-2147483647: %i32 = int_value -2147483647 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_-2147483648: %i32 = int_value -2147483648 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } @@ -233,7 +213,7 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -248,7 +228,7 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: .c = @__global_init.%c // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Sub.decl: %Sub.type = fn_decl @Sub [template = constants.%Sub] { +// CHECK:STDOUT: %Sub.decl: %Sub.type.1 = fn_decl @Sub.1 [template = constants.%Sub] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -257,17 +237,11 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_19: init type = call constants.%Int(%int_32.loc4_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %int.make_type_signed.loc4_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.2: type = converted %int.make_type_signed.loc4_19, %.loc4_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -276,33 +250,27 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_signed.loc6, %.loc6_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_signed.loc7, %.loc7_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_32.loc8) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8.2: type = converted %int.make_type_signed.loc8, %.loc8_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc8: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Sub(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.usub"; +// CHECK:STDOUT: fn @Sub.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.usub"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Sub.ref.loc6: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref.loc6: %Sub.type.1 = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %int_0.loc6: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_2147483647.loc6: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc6_18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc6_18: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc6_18: = bound_method %int_0.loc6, %impl.elem0.loc6_18 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc6_18: = specific_function %Convert.bound.loc6_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc6_18: init %i32 = call %Convert.specific_fn.loc6_18(%int_0.loc6) [template = constants.%int_0.2] // CHECK:STDOUT: %.loc6_18.1: %i32 = value_of_initializer %int.convert_checked.loc6_18 [template = constants.%int_0.2] // CHECK:STDOUT: %.loc6_18.2: %i32 = converted %int_0.loc6, %.loc6_18.1 [template = constants.%int_0.2] -// CHECK:STDOUT: %impl.elem0.loc6_21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc6_21: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc6_21: = bound_method %int_2147483647.loc6, %impl.elem0.loc6_21 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc6_21: = specific_function %Convert.bound.loc6_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc6_21: init %i32 = call %Convert.specific_fn.loc6_21(%int_2147483647.loc6) [template = constants.%int_2147483647.2] @@ -312,17 +280,17 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %.loc6_32.1: %i32 = value_of_initializer %int.usub.loc6 [template = constants.%int_-2147483647] // CHECK:STDOUT: %.loc6_32.2: %i32 = converted %int.usub.loc6, %.loc6_32.1 [template = constants.%int_-2147483647] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc6_32.2 -// CHECK:STDOUT: %Sub.ref.loc7_14: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %Sub.ref.loc7_18: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref.loc7_14: %Sub.type.1 = name_ref Sub, file.%Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref.loc7_18: %Sub.type.1 = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %int_0.loc7: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_2147483647.loc7: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc7_22: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc7_22: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc7_22: = bound_method %int_0.loc7, %impl.elem0.loc7_22 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc7_22: = specific_function %Convert.bound.loc7_22, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc7_22: init %i32 = call %Convert.specific_fn.loc7_22(%int_0.loc7) [template = constants.%int_0.2] // CHECK:STDOUT: %.loc7_22.1: %i32 = value_of_initializer %int.convert_checked.loc7_22 [template = constants.%int_0.2] // CHECK:STDOUT: %.loc7_22.2: %i32 = converted %int_0.loc7, %.loc7_22.1 [template = constants.%int_0.2] -// CHECK:STDOUT: %impl.elem0.loc7_25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc7_25: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc7_25: = bound_method %int_2147483647.loc7, %impl.elem0.loc7_25 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc7_25: = specific_function %Convert.bound.loc7_25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc7_25: init %i32 = call %Convert.specific_fn.loc7_25(%int_2147483647.loc7) [template = constants.%int_2147483647.2] @@ -332,7 +300,7 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc7_35.1: %i32 = value_of_initializer %int.usub.loc7_35 [template = constants.%int_-2147483647] // CHECK:STDOUT: %.loc7_35.2: %i32 = converted %int.usub.loc7_35, %.loc7_35.1 [template = constants.%int_-2147483647] -// CHECK:STDOUT: %impl.elem0.loc7_38: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc7_38: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc7_38: = bound_method %int_1, %impl.elem0.loc7_38 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc7_38: = specific_function %Convert.bound.loc7_38, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc7_38: init %i32 = call %Convert.specific_fn.loc7_38(%int_1) [template = constants.%int_1.2] @@ -342,17 +310,17 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %.loc7_40.1: %i32 = value_of_initializer %int.usub.loc7_39 [template = constants.%int_-2147483648] // CHECK:STDOUT: %.loc7_40.2: %i32 = converted %int.usub.loc7_39, %.loc7_40.1 [template = constants.%int_-2147483648] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc7_40.2 -// CHECK:STDOUT: %Sub.ref.loc8_14: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %Sub.ref.loc8_18: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref.loc8_14: %Sub.type.1 = name_ref Sub, file.%Sub.decl [template = constants.%Sub] +// CHECK:STDOUT: %Sub.ref.loc8_18: %Sub.type.1 = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %int_0.loc8: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_2147483647.loc8: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] -// CHECK:STDOUT: %impl.elem0.loc8_22: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc8_22: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc8_22: = bound_method %int_0.loc8, %impl.elem0.loc8_22 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc8_22: = specific_function %Convert.bound.loc8_22, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc8_22: init %i32 = call %Convert.specific_fn.loc8_22(%int_0.loc8) [template = constants.%int_0.2] // CHECK:STDOUT: %.loc8_22.1: %i32 = value_of_initializer %int.convert_checked.loc8_22 [template = constants.%int_0.2] // CHECK:STDOUT: %.loc8_22.2: %i32 = converted %int_0.loc8, %.loc8_22.1 [template = constants.%int_0.2] -// CHECK:STDOUT: %impl.elem0.loc8_25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc8_25: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc8_25: = bound_method %int_2147483647.loc8, %impl.elem0.loc8_25 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc8_25: = specific_function %Convert.bound.loc8_25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc8_25: init %i32 = call %Convert.specific_fn.loc8_25(%int_2147483647.loc8) [template = constants.%int_2147483647.2] @@ -362,7 +330,7 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc8_35.1: %i32 = value_of_initializer %int.usub.loc8_35 [template = constants.%int_-2147483647] // CHECK:STDOUT: %.loc8_35.2: %i32 = converted %int.usub.loc8_35, %.loc8_35.1 [template = constants.%int_-2147483647] -// CHECK:STDOUT: %impl.elem0.loc8_38: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc8_38: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc8_38: = bound_method %int_2, %impl.elem0.loc8_38 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc8_38: = specific_function %Convert.bound.loc8_38, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc8_38: init %i32 = call %Convert.specific_fn.loc8_38(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/builtins/int/xor.carbon b/toolchain/check/testdata/builtins/int/xor.carbon index 0834a7b9cd30..de1754bd8d93 100644 --- a/toolchain/check/testdata/builtins/int/xor.carbon +++ b/toolchain/check/testdata/builtins/int/xor.carbon @@ -23,30 +23,28 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Xor.type: type = fn_type @Xor [template] // CHECK:STDOUT: %Xor: %Xor.type = struct_value () [template] // CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: %int_10.1: Core.IntLiteral = int_value 10 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_10.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_10.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_10.2: %i32 = int_value 10 [template] // CHECK:STDOUT: %int_6.1: %i32 = int_value 6 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_6.1, %Convert.15 [template] -// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_6.1, %Convert.11 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.3(%int_32) [template] // CHECK:STDOUT: %int_6.2: Core.IntLiteral = int_value 6 [template] // CHECK:STDOUT: %array_type: type = array_type %int_6.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -57,7 +55,7 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -81,17 +79,11 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_11: init type = call constants.%Int(%int_32.loc2_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %int.make_type_signed.loc2_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_11.2: type = converted %int.make_type_signed.loc2_11, %.loc2_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_19: init type = call constants.%Int(%int_32.loc2_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %int.make_type_signed.loc2_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_19.2: type = converted %int.make_type_signed.loc2_19, %.loc2_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc2_27: init type = call constants.%Int(%int_32.loc2_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int.make_type_signed.loc2_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc2_27.2: type = converted %int.make_type_signed.loc2_27, %.loc2_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc2_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -100,28 +92,26 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // 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: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %Xor.ref: %Xor.type = name_ref Xor, %Xor.decl [template = constants.%Xor] // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [template = constants.%int_10.1] -// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_12, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_12) [template = constants.%int_12.2] // CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_12.2] // CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_12, %.loc4_20.1 [template = constants.%int_12.2] -// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int_10, %impl.elem0.loc4_24 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc4_24: init %i32 = call %Convert.specific_fn.loc4_24(%int_10) [template = constants.%int_10.2] // CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%int_10.2] // CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int_10, %.loc4_24.1 [template = constants.%int_10.2] // CHECK:STDOUT: %int.xor: init %i32 = call %Xor.ref(%.loc4_20.2, %.loc4_24.2) [template = constants.%int_6.1] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc4_26: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %impl.elem0.loc4_26: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc4_26: = bound_method %int.xor, %impl.elem0.loc4_26 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_26: = specific_function %Convert.bound.loc4_26, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %Convert.specific_fn.loc4_26: = specific_function %Convert.bound.loc4_26, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %.loc4_26.1: %i32 = value_of_initializer %int.xor [template = constants.%int_6.1] // CHECK:STDOUT: %.loc4_26.2: %i32 = converted %int.xor, %.loc4_26.1 [template = constants.%int_6.1] // CHECK:STDOUT: %int.convert_checked.loc4_26: init Core.IntLiteral = call %Convert.specific_fn.loc4_26(%.loc4_26.2) [template = constants.%int_6.2] @@ -131,10 +121,8 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var // 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: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.2] -// CHECK:STDOUT: %.loc5_13.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_13.2: type = converted %int.make_type_signed.loc5, %.loc5_13.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc5: type = array_type %int_6, %i32 [template = constants.%array_type] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -146,17 +134,11 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_19.2: type = converted %int.make_type_signed.loc7_19, %.loc7_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call constants.%Int(%int_32.loc7_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed.loc7_27, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_35: init type = call constants.%Int(%int_32.loc7_35) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %int.make_type_signed.loc7_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_35.2: type = converted %int.make_type_signed.loc7_35, %.loc7_35.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 diff --git a/toolchain/check/testdata/builtins/print.carbon b/toolchain/check/testdata/builtins/print.carbon index 1d7a4d4b2782..d321a0039bb4 100644 --- a/toolchain/check/testdata/builtins/print.carbon +++ b/toolchain/check/testdata/builtins/print.carbon @@ -20,26 +20,24 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Print.type.1: type = fn_type @Print.1 [template] // CHECK:STDOUT: %Print.1: %Print.type.1 = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %Print.type.2: type = fn_type @Print.2 [template] // CHECK:STDOUT: %Print.2: %Print.type.2 = struct_value () [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } @@ -47,12 +45,12 @@ fn Main() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 -// CHECK:STDOUT: .Print = %import_ref.38 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 +// CHECK:STDOUT: .Print = %import_ref.193 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.38: %Print.type.2 = import_ref Core//prelude, Print, loaded [template = constants.%Print.2] +// CHECK:STDOUT: %import_ref.193: %Print.type.2 = import_ref Core//prelude, Print, loaded [template = constants.%Print.2] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -67,9 +65,7 @@ fn Main() { // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: } @@ -82,7 +78,7 @@ fn Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Print.ref.loc14: %Print.type.1 = name_ref Print, file.%Print.decl [template = constants.%Print.1] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc14: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14: = bound_method %int_1, %impl.elem0.loc14 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc14: = specific_function %Convert.bound.loc14, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %Convert.specific_fn.loc14(%int_1) [template = constants.%int_1.2] @@ -90,9 +86,9 @@ fn Main() { // CHECK:STDOUT: %.loc14_9.2: %i32 = converted %int_1, %.loc14_9.1 [template = constants.%int_1.2] // CHECK:STDOUT: %print.int.loc14: init %empty_tuple.type = call %Print.ref.loc14(%.loc14_9.2) // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %Print.ref.loc16: %Print.type.2 = name_ref Print, imports.%import_ref.38 [template = constants.%Print.2] +// CHECK:STDOUT: %Print.ref.loc16: %Print.type.2 = name_ref Print, imports.%import_ref.193 [template = constants.%Print.2] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc16: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc16: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc16: = bound_method %int_2, %impl.elem0.loc16 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc16: = specific_function %Convert.bound.loc16, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %Convert.specific_fn.loc16(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/class/access_modifers.carbon b/toolchain/check/testdata/class/access_modifers.carbon index f4e0fbf4cd24..14157472dd79 100644 --- a/toolchain/check/testdata/class/access_modifers.carbon +++ b/toolchain/check/testdata/class/access_modifers.carbon @@ -150,16 +150,14 @@ class A { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Circle: type = class_type @Circle [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Circle.elem: type = unbound_element_type %Circle, %i32 [template] // CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_5.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] // CHECK:STDOUT: %SomeInternalFunction.type: type = fn_type @SomeInternalFunction [template] @@ -167,9 +165,9 @@ class A { // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %Make: %Make.type = struct_value () [template] // CHECK:STDOUT: %struct_type.radius.1: type = struct_type {.radius: %i32} [template] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.radius.1 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.radius.1 [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %struct_type.radius.2: type = struct_type {.radius: Core.IntLiteral} [template] @@ -181,7 +179,7 @@ class A { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -200,16 +198,12 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: class @Circle { // 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_23.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_23.2: type = converted %int.make_type_signed.loc5, %.loc5_23.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_21: %Circle.elem = field_decl radius, element0 [template] +// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5: %Circle.elem = field_decl radius, element0 [template] // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_39.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_39.2: type = converted %int.make_type_signed.loc6, %.loc6_39.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_5, %impl.elem0 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_5) [template = constants.%int_5.2] @@ -221,9 +215,7 @@ class A { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc8_40.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_40.2: type = converted %int.make_type_signed, %.loc8_40.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -235,11 +227,11 @@ class A { // CHECK:STDOUT: %return.param: ref %Circle = out_param runtime_param0 // CHECK:STDOUT: %return: ref %Circle = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.radius.1 [template = constants.%complete_type.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.radius.1 [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Circle -// CHECK:STDOUT: .radius [private] = %.loc5_21 +// CHECK:STDOUT: .radius [private] = %.loc5 // CHECK:STDOUT: .SOME_INTERNAL_CONSTANT [private] = %SOME_INTERNAL_CONSTANT // CHECK:STDOUT: .SomeInternalFunction [private] = %SomeInternalFunction.decl // CHECK:STDOUT: .Make = %Make.decl @@ -249,7 +241,7 @@ class A { // CHECK:STDOUT: fn @SomeInternalFunction() -> %i32 { // CHECK:STDOUT: !entry: // 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: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] @@ -262,7 +254,7 @@ class A { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] // CHECK:STDOUT: %.loc13_24.1: %struct_type.radius.2 = struct_literal (%int_5) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_5, %impl.elem0 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_5) [template = constants.%int_5.2] @@ -285,9 +277,7 @@ class A { // CHECK:STDOUT: %.loc18_36.3: %Circle = bind_value %.loc18_36.2 // CHECK:STDOUT: %circle: %Circle = bind_name circle, %.loc18_36.3 // 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: %.loc26_15.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc26_15.2: type = converted %int.make_type_signed, %.loc26_15.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %circle.ref.loc26: %Circle = name_ref circle, %circle // CHECK:STDOUT: %radius.ref.loc26: = name_ref radius, [template = ] // CHECK:STDOUT: %radius: %i32 = bind_name radius, @@ -307,19 +297,17 @@ class A { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %A.elem: type = unbound_element_type %A, %i32 [template] // CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %i32} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -338,24 +326,20 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: class @A { // 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: %.loc5_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc5_20.2: type = converted %int.make_type_signed, %.loc5_20.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: %A.elem = field_decl x, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template = constants.%complete_type] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5: %A.elem = field_decl x, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A -// CHECK:STDOUT: .x [protected] = %.loc5_18 +// CHECK:STDOUT: .x [protected] = %.loc5 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: // 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: %.loc16_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_10.2: type = converted %int.make_type_signed, %.loc16_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %x.ref: = name_ref x, [template = ] // CHECK:STDOUT: %x: %i32 = bind_name x, @@ -367,9 +351,7 @@ class A { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Circle: type = class_type @Circle [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Circle.elem: type = unbound_element_type %Circle, %i32 [template] // CHECK:STDOUT: %GetRadius.type: type = fn_type @GetRadius [template] // CHECK:STDOUT: %GetRadius: %GetRadius.type = struct_value () [template] @@ -378,13 +360,13 @@ class A { // CHECK:STDOUT: %Compute.type: type = fn_type @Compute [template] // CHECK:STDOUT: %Compute: %Compute.type = struct_value () [template] // CHECK:STDOUT: %struct_type.radius: type = struct_type {.radius: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.radius [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.radius [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -392,7 +374,7 @@ class A { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -409,10 +391,8 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: class @Circle { // 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: %.loc5_23.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc5_23.2: type = converted %int.make_type_signed, %.loc5_23.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_21: %Circle.elem = field_decl radius, element0 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5: %Circle.elem = field_decl radius, element0 [template] // CHECK:STDOUT: %GetRadius.decl: %GetRadius.type = fn_decl @GetRadius [template = constants.%GetRadius] { // CHECK:STDOUT: %self.patt: %Circle = binding_pattern self // CHECK:STDOUT: %self.param_patt: %Circle = value_param_pattern %self.patt, runtime_param0 @@ -421,9 +401,7 @@ class A { // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Circle [template = constants.%Circle] // 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: %.loc7_33.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc7_33.2: type = converted %int.make_type_signed, %.loc7_33.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param: %Circle = value_param runtime_param0 // CHECK:STDOUT: %self: %Circle = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -434,9 +412,7 @@ class A { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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_40.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_40.2: type = converted %int.make_type_signed, %.loc11_40.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -448,19 +424,17 @@ class A { // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Circle [template = constants.%Circle] // 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: %.loc15_31.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_31.2: type = converted %int.make_type_signed, %.loc15_31.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param: %Circle = value_param runtime_param0 // CHECK:STDOUT: %self: %Circle = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.radius [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.radius [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Circle -// CHECK:STDOUT: .radius [private] = %.loc5_21 +// CHECK:STDOUT: .radius [private] = %.loc5 // CHECK:STDOUT: .GetRadius = %GetRadius.decl // CHECK:STDOUT: .SomeInternalFunction [private] = %SomeInternalFunction.decl // CHECK:STDOUT: .Compute = %Compute.decl @@ -470,7 +444,7 @@ class A { // CHECK:STDOUT: fn @GetRadius[%self.param_patt: %Circle]() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %Circle = name_ref self, %self -// CHECK:STDOUT: %radius.ref: %Circle.elem = name_ref radius, @Circle.%.loc5_21 [template = @Circle.%.loc5_21] +// CHECK:STDOUT: %radius.ref: %Circle.elem = name_ref radius, @Circle.%.loc5 [template = @Circle.%.loc5] // CHECK:STDOUT: %.loc8_16.1: ref %i32 = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc8_16.2: %i32 = bind_value %.loc8_16.1 // CHECK:STDOUT: return %.loc8_16.2 @@ -479,7 +453,7 @@ class A { // CHECK:STDOUT: fn @SomeInternalFunction() -> %i32 { // CHECK:STDOUT: !entry: // 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: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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] @@ -503,25 +477,23 @@ class A { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_5.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -536,25 +508,21 @@ class A { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} {} // 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: %.loc8_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8.2: type = converted %int.make_type_signed, %.loc8_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { // 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: %.loc5_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_signed, %.loc5_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_5, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_5) [template = constants.%int_5.2] // CHECK:STDOUT: %.loc5_17.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_5.2] // CHECK:STDOUT: %.loc5_17.2: %i32 = converted %int_5, %.loc5_17.1 [template = constants.%int_5.2] // CHECK:STDOUT: %x: %i32 = bind_name x, %.loc5_17.2 -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -575,25 +543,23 @@ class A { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_5.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -609,22 +575,16 @@ class A { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} {} // 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_8.1: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_8.2: type = converted %int.make_type_signed.loc16, %.loc16_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc23: init type = call constants.%Int(%int_32.loc23) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_8.1: type = value_of_initializer %int.make_type_signed.loc23 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_8.2: type = converted %int.make_type_signed.loc23, %.loc23_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { // 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_20.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_20.2: type = converted %int.make_type_signed.loc5, %.loc5_20.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_5.loc5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] -// CHECK:STDOUT: %impl.elem0.loc5: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc5: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc5: = bound_method %int_5.loc5, %impl.elem0.loc5 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc5: = specific_function %Convert.bound.loc5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc5: init %i32 = call %Convert.specific_fn.loc5(%int_5.loc5) [template = constants.%int_5.2] @@ -632,18 +592,16 @@ class A { // CHECK:STDOUT: %.loc5_27.2: %i32 = converted %int_5.loc5, %.loc5_27.1 [template = constants.%int_5.2] // CHECK:STDOUT: %x: %i32 = bind_name x, %.loc5_27.2 // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_18.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_18.2: type = converted %int.make_type_signed.loc6, %.loc6_18.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_5.loc6: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] -// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc6: = bound_method %int_5.loc6, %impl.elem0.loc6 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc6: = specific_function %Convert.bound.loc6, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %Convert.specific_fn.loc6(%int_5.loc6) [template = constants.%int_5.2] // CHECK:STDOUT: %.loc6_25.1: %i32 = value_of_initializer %int.convert_checked.loc6 [template = constants.%int_5.2] // CHECK:STDOUT: %.loc6_25.2: %i32 = converted %int_5.loc6, %.loc6_25.1 [template = constants.%int_5.2] // CHECK:STDOUT: %y: %i32 = bind_name y, %.loc6_25.2 -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A diff --git a/toolchain/check/testdata/class/adapter/adapt.carbon b/toolchain/check/testdata/class/adapter/adapt.carbon index 6a2e359b1e51..9799d4dfe38c 100644 --- a/toolchain/check/testdata/class/adapter/adapt.carbon +++ b/toolchain/check/testdata/class/adapter/adapt.carbon @@ -50,19 +50,17 @@ fn F(a: AdaptNotExtend) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %SomeClass: type = class_type @SomeClass [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %SomeClass.elem: type = unbound_element_type %SomeClass, %i32 [template] // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.a.b [template] // CHECK:STDOUT: %SomeClassAdapter: type = class_type @SomeClassAdapter [template] // CHECK:STDOUT: %StructAdapter: type = class_type @StructAdapter [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -83,28 +81,24 @@ fn F(a: AdaptNotExtend) { // CHECK:STDOUT: // CHECK:STDOUT: class @SomeClass { // 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_10.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_signed.loc5, %.loc5_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_8: %SomeClass.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5: %SomeClass.elem = field_decl a, element0 [template] // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.2: type = converted %int.make_type_signed.loc6, %.loc6_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8: %SomeClass.elem = field_decl b, element1 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type] +// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc6: %SomeClass.elem = field_decl b, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SomeClass -// CHECK:STDOUT: .a = %.loc5_8 -// CHECK:STDOUT: .b = %.loc6_8 +// CHECK:STDOUT: .a = %.loc5 +// CHECK:STDOUT: .b = %.loc6 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @SomeClassAdapter { // CHECK:STDOUT: %SomeClass.ref: type = name_ref SomeClass, file.%SomeClass.decl [template = constants.%SomeClass] // CHECK:STDOUT: adapt_decl %SomeClass.ref [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SomeClassAdapter @@ -113,16 +107,12 @@ fn F(a: AdaptNotExtend) { // CHECK:STDOUT: // CHECK:STDOUT: class @StructAdapter { // CHECK:STDOUT: %int_32.loc14_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_14: init type = call constants.%Int(%int_32.loc14_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_14.1: type = value_of_initializer %int.make_type_signed.loc14_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_14.2: type = converted %int.make_type_signed.loc14_14, %.loc14_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc14_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_23: init type = call constants.%Int(%int_32.loc14_23) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_23.1: type = value_of_initializer %int.make_type_signed.loc14_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_23.2: type = converted %int.make_type_signed.loc14_23, %.loc14_23.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b] // CHECK:STDOUT: adapt_decl %struct_type.a.b [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%StructAdapter diff --git a/toolchain/check/testdata/class/adapter/adapt_copy.carbon b/toolchain/check/testdata/class/adapter/adapt_copy.carbon index f5b29484f8ee..4c36fadfdfbb 100644 --- a/toolchain/check/testdata/class/adapter/adapt_copy.carbon +++ b/toolchain/check/testdata/class/adapter/adapt_copy.carbon @@ -105,10 +105,9 @@ fn H(a: AdaptNoncopyableIndirect) -> AdaptNoncopyableIndirect { // CHECK:STDOUT: constants { // CHECK:STDOUT: %AdaptCopyable: type = class_type @AdaptCopyable [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, %int_32 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %i32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32.builtin [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] @@ -119,7 +118,7 @@ fn H(a: AdaptNoncopyableIndirect) -> AdaptNoncopyableIndirect { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -155,18 +154,14 @@ fn H(a: AdaptNoncopyableIndirect) -> AdaptNoncopyableIndirect { // CHECK:STDOUT: } { // CHECK:STDOUT: %AdaptCopyable.ref.loc15_16: type = name_ref AdaptCopyable, file.%AdaptCopyable.decl [template = constants.%AdaptCopyable] // CHECK:STDOUT: %int_32.loc15_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc15_31: init type = call constants.%Int(%int_32.loc15_31) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_34.1: %tuple.type.1 = tuple_literal (%AdaptCopyable.ref.loc15_16, %int.make_type_signed.loc15_31) -// CHECK:STDOUT: %.loc15_34.2: type = value_of_initializer %int.make_type_signed.loc15_31 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_34.3: type = converted %int.make_type_signed.loc15_31, %.loc15_34.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_34.4: type = converted %.loc15_34.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc15_31: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_34.1: %tuple.type.1 = tuple_literal (%AdaptCopyable.ref.loc15_16, %i32.loc15_31) +// CHECK:STDOUT: %.loc15_34.2: type = converted %.loc15_34.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %AdaptCopyable.ref.loc15_41: type = name_ref AdaptCopyable, file.%AdaptCopyable.decl [template = constants.%AdaptCopyable] // CHECK:STDOUT: %int_32.loc15_56: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc15_56: init type = call constants.%Int(%int_32.loc15_56) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_59.1: %tuple.type.1 = tuple_literal (%AdaptCopyable.ref.loc15_41, %int.make_type_signed.loc15_56) -// CHECK:STDOUT: %.loc15_59.2: type = value_of_initializer %int.make_type_signed.loc15_56 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_59.3: type = converted %int.make_type_signed.loc15_56, %.loc15_59.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_59.4: type = converted %.loc15_59.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc15_56: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_59.1: %tuple.type.1 = tuple_literal (%AdaptCopyable.ref.loc15_41, %i32.loc15_56) +// CHECK:STDOUT: %.loc15_59.2: type = converted %.loc15_59.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %c.param: %tuple.type.2 = value_param runtime_param0 // CHECK:STDOUT: %c: %tuple.type.2 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %tuple.type.2 = out_param runtime_param1 @@ -176,11 +171,9 @@ fn H(a: AdaptNoncopyableIndirect) -> AdaptNoncopyableIndirect { // CHECK:STDOUT: // CHECK:STDOUT: class @AdaptCopyable { // 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: %.loc5_12.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc5_12.2: type = converted %int.make_type_signed, %.loc5_12.1 [template = constants.%i32] -// CHECK:STDOUT: adapt_decl %.loc5_12.2 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %i32 [template = constants.%complete_type] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: adapt_decl %i32 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %i32.builtin [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AdaptCopyable @@ -203,11 +196,9 @@ fn H(a: AdaptNoncopyableIndirect) -> AdaptNoncopyableIndirect { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %AdaptCopyable.ref.loc16: type = name_ref AdaptCopyable, file.%AdaptCopyable.decl [template = constants.%AdaptCopyable] // 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_29.1: %tuple.type.1 = tuple_literal (%AdaptCopyable.ref.loc16, %int.make_type_signed.loc16) -// CHECK:STDOUT: %.loc16_29.2: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_29.3: type = converted %int.make_type_signed.loc16, %.loc16_29.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_29.4: type = converted %.loc16_29.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_29.1: %tuple.type.1 = tuple_literal (%AdaptCopyable.ref.loc16, %i32.loc16) +// CHECK:STDOUT: %.loc16_29.2: type = converted %.loc16_29.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %d.var: ref %tuple.type.2 = var d // CHECK:STDOUT: %d: ref %tuple.type.2 = bind_name d, %d.var // CHECK:STDOUT: %c.ref: %tuple.type.2 = name_ref c, %c @@ -239,19 +230,17 @@ fn H(a: AdaptNoncopyableIndirect) -> AdaptNoncopyableIndirect { // CHECK:STDOUT: constants { // CHECK:STDOUT: %AdaptTuple: type = class_type @AdaptTuple [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [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: %complete_type: = complete_type_witness %tuple.type.2 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %tuple.type.2 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -282,17 +271,13 @@ fn H(a: AdaptNoncopyableIndirect) -> AdaptNoncopyableIndirect { // CHECK:STDOUT: // CHECK:STDOUT: class @AdaptTuple { // CHECK:STDOUT: %int_32.loc5_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_10: init type = call constants.%Int(%int_32.loc5_10) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_15: init type = call constants.%Int(%int_32.loc5_15) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc5_10, %int.make_type_signed.loc5_15) -// CHECK:STDOUT: %.loc5_19.1: type = value_of_initializer %int.make_type_signed.loc5_10 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_signed.loc5_10, %.loc5_19.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.3: type = value_of_initializer %int.make_type_signed.loc5_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.4: type = converted %int.make_type_signed.loc5_15, %.loc5_19.3 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.5: type = converted %.loc5_18, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: adapt_decl %.loc5_19.5 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %tuple.type.2 [template = constants.%complete_type] +// CHECK:STDOUT: %i32.loc5_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_18: %tuple.type.1 = tuple_literal (%i32.loc5_10, %i32.loc5_15) +// CHECK:STDOUT: %.loc5_19: type = converted %.loc5_18, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: adapt_decl %.loc5_19 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %tuple.type.2 [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AdaptTuple @@ -392,19 +377,17 @@ fn H(a: AdaptNoncopyableIndirect) -> AdaptNoncopyableIndirect { // CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %AdaptNoncopyableIndirect: type = class_type @AdaptNoncopyableIndirect [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %Noncopyable, %i32) [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %tuple.type.2 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %tuple.type.2 [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -445,18 +428,14 @@ fn H(a: AdaptNoncopyableIndirect) -> AdaptNoncopyableIndirect { // CHECK:STDOUT: // CHECK:STDOUT: class @AdaptNoncopyableIndirect { // CHECK:STDOUT: %int_32.loc9_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc9_10: init type = call constants.%Int(%int_32.loc9_10) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc9_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %Noncopyable.ref: type = name_ref Noncopyable, file.%Noncopyable.decl [template = constants.%Noncopyable] // CHECK:STDOUT: %int_32.loc9_28: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc9_28: init type = call constants.%Int(%int_32.loc9_28) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_31: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc9_10, %Noncopyable.ref, %int.make_type_signed.loc9_28) -// CHECK:STDOUT: %.loc9_32.1: type = value_of_initializer %int.make_type_signed.loc9_10 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_32.2: type = converted %int.make_type_signed.loc9_10, %.loc9_32.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_32.3: type = value_of_initializer %int.make_type_signed.loc9_28 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_32.4: type = converted %int.make_type_signed.loc9_28, %.loc9_32.3 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_32.5: type = converted %.loc9_31, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: adapt_decl %.loc9_32.5 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %tuple.type.2 [template = constants.%complete_type.2] +// CHECK:STDOUT: %i32.loc9_28: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc9_31: %tuple.type.1 = tuple_literal (%i32.loc9_10, %Noncopyable.ref, %i32.loc9_28) +// CHECK:STDOUT: %.loc9_32: type = converted %.loc9_31, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: adapt_decl %.loc9_32 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %tuple.type.2 [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AdaptNoncopyableIndirect diff --git a/toolchain/check/testdata/class/adapter/extend_adapt.carbon b/toolchain/check/testdata/class/adapter/extend_adapt.carbon index 3959adb39ad2..3c624e91a6c7 100644 --- a/toolchain/check/testdata/class/adapter/extend_adapt.carbon +++ b/toolchain/check/testdata/class/adapter/extend_adapt.carbon @@ -143,17 +143,15 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: %SomeClassAdapter: type = class_type @SomeClassAdapter [template] // CHECK:STDOUT: %SomeClass: type = class_type @SomeClass [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %SomeClass.elem: type = unbound_element_type %SomeClass, %i32 [template] // CHECK:STDOUT: %StaticMemberFunction.type: type = fn_type @StaticMemberFunction [template] // CHECK:STDOUT: %StaticMemberFunction: %StaticMemberFunction.type = struct_value () [template] // CHECK:STDOUT: %AdapterMethod.type: type = fn_type @AdapterMethod [template] // CHECK:STDOUT: %AdapterMethod: %AdapterMethod.type = struct_value () [template] // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.a.b [template] // CHECK:STDOUT: %TestStaticMemberFunction.type: type = fn_type @TestStaticMemberFunction [template] // CHECK:STDOUT: %TestStaticMemberFunction: %TestStaticMemberFunction.type = struct_value () [template] // CHECK:STDOUT: %TestAdapterMethod.type: type = fn_type @TestAdapterMethod [template] @@ -162,7 +160,7 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -201,7 +199,7 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: class @SomeClassAdapter { // CHECK:STDOUT: %SomeClass.ref: type = name_ref SomeClass, file.%SomeClass.decl [template = constants.%SomeClass] // CHECK:STDOUT: adapt_decl %SomeClass.ref [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SomeClassAdapter @@ -211,15 +209,11 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: class @SomeClass { // CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_10.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_10.2: type = converted %int.make_type_signed.loc7, %.loc7_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8: %SomeClass.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %i32.loc7: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc7: %SomeClass.elem = field_decl a, element0 [template] // CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_32.loc8) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_10.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_10.2: type = converted %int.make_type_signed.loc8, %.loc8_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8: %SomeClass.elem = field_decl b, element1 [template] +// CHECK:STDOUT: %i32.loc8: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc8: %SomeClass.elem = field_decl b, element1 [template] // CHECK:STDOUT: %StaticMemberFunction.decl: %StaticMemberFunction.type = fn_decl @StaticMemberFunction [template = constants.%StaticMemberFunction] {} {} // CHECK:STDOUT: %AdapterMethod.decl: %AdapterMethod.type = fn_decl @AdapterMethod [template = constants.%AdapterMethod] { // CHECK:STDOUT: %self.patt: %SomeClassAdapter = binding_pattern self @@ -229,12 +223,12 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: %self.param: %SomeClassAdapter = value_param runtime_param0 // CHECK:STDOUT: %self: %SomeClassAdapter = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SomeClass -// CHECK:STDOUT: .a = %.loc7_8 -// CHECK:STDOUT: .b = %.loc8_8 +// CHECK:STDOUT: .a = %.loc7 +// CHECK:STDOUT: .b = %.loc8 // CHECK:STDOUT: .StaticMemberFunction = %StaticMemberFunction.decl // CHECK:STDOUT: .AdapterMethod = %AdapterMethod.decl // CHECK:STDOUT: complete_type_witness = %complete_type @@ -348,12 +342,10 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %SomeClass: type = class_type @SomeClass [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %SomeClass.elem: type = unbound_element_type %SomeClass, %i32 [template] // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.a.b [template] // CHECK:STDOUT: %SomeClassAdapter: type = class_type @SomeClassAdapter [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] @@ -362,7 +354,7 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -386,9 +378,7 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %SomeClassAdapter.ref: type = name_ref SomeClassAdapter, file.%SomeClassAdapter.decl [template = constants.%SomeClassAdapter] // 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_30.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_30.2: type = converted %int.make_type_signed, %.loc13_30.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %SomeClassAdapter = value_param runtime_param0 // CHECK:STDOUT: %a: %SomeClassAdapter = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -398,28 +388,24 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: class @SomeClass { // 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_10.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_signed.loc5, %.loc5_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_8: %SomeClass.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5: %SomeClass.elem = field_decl a, element0 [template] // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.2: type = converted %int.make_type_signed.loc6, %.loc6_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8: %SomeClass.elem = field_decl b, element1 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type] +// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc6: %SomeClass.elem = field_decl b, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SomeClass -// CHECK:STDOUT: .a = %.loc5_8 -// CHECK:STDOUT: .b = %.loc6_8 +// CHECK:STDOUT: .a = %.loc5 +// CHECK:STDOUT: .b = %.loc6 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @SomeClassAdapter { // CHECK:STDOUT: %SomeClass.ref: type = name_ref SomeClass, file.%SomeClass.decl [template = constants.%SomeClass] // CHECK:STDOUT: adapt_decl %SomeClass.ref [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SomeClassAdapter @@ -430,7 +416,7 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: fn @F(%a.param_patt: %SomeClassAdapter) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %SomeClassAdapter = name_ref a, %a -// CHECK:STDOUT: %b.ref: %SomeClass.elem = name_ref b, @SomeClass.%.loc6_8 [template = @SomeClass.%.loc6_8] +// CHECK:STDOUT: %b.ref: %SomeClass.elem = name_ref b, @SomeClass.%.loc6 [template = @SomeClass.%.loc6] // CHECK:STDOUT: %.loc21_11.1: %SomeClass = converted %a.ref, [template = ] // CHECK:STDOUT: %.loc21_11.2: %i32 = class_element_access , element1 [template = ] // CHECK:STDOUT: return @@ -441,18 +427,16 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %StructAdapter: type = class_type @StructAdapter [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.a.b [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -474,9 +458,7 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %StructAdapter.ref: type = name_ref StructAdapter, file.%StructAdapter.decl [template = constants.%StructAdapter] // 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: %.loc8_27.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_27.2: type = converted %int.make_type_signed, %.loc8_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %StructAdapter = value_param runtime_param0 // CHECK:STDOUT: %a: %StructAdapter = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -486,16 +468,12 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: class @StructAdapter { // CHECK:STDOUT: %int_32.loc5_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_21: init type = call constants.%Int(%int_32.loc5_21) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_21.1: type = value_of_initializer %int.make_type_signed.loc5_21 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_21.2: type = converted %int.make_type_signed.loc5_21, %.loc5_21.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_30: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_30: init type = call constants.%Int(%int_32.loc5_30) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_30.1: type = value_of_initializer %int.make_type_signed.loc5_30 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_30.2: type = converted %int.make_type_signed.loc5_30, %.loc5_30.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_30: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b] // CHECK:STDOUT: adapt_decl %struct_type.a.b [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%StructAdapter @@ -515,12 +493,10 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %TupleAdapter: type = class_type @TupleAdapter [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [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: %complete_type: = complete_type_witness %tuple.type.2 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %tuple.type.2 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] @@ -528,7 +504,7 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -550,9 +526,7 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %TupleAdapter.ref: type = name_ref TupleAdapter, file.%TupleAdapter.decl [template = constants.%TupleAdapter] // 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: %.loc8_26.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_26.2: type = converted %int.make_type_signed, %.loc8_26.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %TupleAdapter = value_param runtime_param0 // CHECK:STDOUT: %a: %TupleAdapter = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -562,21 +536,17 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: class @TupleAdapter { // CHECK:STDOUT: %int_32.loc5_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_17: init type = call constants.%Int(%int_32.loc5_17) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_22: init type = call constants.%Int(%int_32.loc5_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_25: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc5_17, %int.make_type_signed.loc5_22) -// CHECK:STDOUT: %.loc5_26.1: type = value_of_initializer %int.make_type_signed.loc5_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_26.2: type = converted %int.make_type_signed.loc5_17, %.loc5_26.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_26.3: type = value_of_initializer %int.make_type_signed.loc5_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_26.4: type = converted %int.make_type_signed.loc5_22, %.loc5_26.3 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_26.5: type = converted %.loc5_25, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: adapt_decl %.loc5_26.5 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %tuple.type.2 [template = constants.%complete_type] +// CHECK:STDOUT: %i32.loc5_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_25: %tuple.type.1 = tuple_literal (%i32.loc5_17, %i32.loc5_22) +// CHECK:STDOUT: %.loc5_26: type = converted %.loc5_25, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: adapt_decl %.loc5_26 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %tuple.type.2 [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%TupleAdapter -// CHECK:STDOUT: extend %.loc5_26.5 +// CHECK:STDOUT: extend %.loc5_26 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -596,10 +566,9 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: %MakeInt: %MakeInt.type = struct_value () [template] // CHECK:STDOUT: %IntAdapter: type = class_type @IntAdapter [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %i32 [template] -// CHECK:STDOUT: %Int.type: type = fn_type @Int [template] -// CHECK:STDOUT: %Int: %Int.type = struct_value () [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %i32.builtin [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -611,7 +580,7 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %IntLiteral.type = import_ref Core//prelude/types, IntLiteral, loaded [template = constants.%IntLiteral] +// CHECK:STDOUT: %import_ref.1: %IntLiteral.type = import_ref Core//prelude/types/int_literal, IntLiteral, loaded [template = constants.%IntLiteral] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -647,9 +616,7 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %IntAdapter.ref: type = name_ref IntAdapter, file.%IntAdapter.decl [template = constants.%IntAdapter] // 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: %.loc10_24.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc10_24.2: type = converted %int.make_type_signed, %.loc10_24.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %IntAdapter = value_param runtime_param0 // CHECK:STDOUT: %a: %IntAdapter = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -660,11 +627,11 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: class @IntAdapter { // CHECK:STDOUT: %MakeInt.ref: %MakeInt.type = name_ref MakeInt, file.%MakeInt.decl [template = constants.%MakeInt] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed: init type = call %MakeInt.ref(%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed, %.loc7_27.1 [template = constants.%i32] +// CHECK:STDOUT: %int.make_type_signed: init type = call %MakeInt.ref(%int_32) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc7_27.2: type = converted %int.make_type_signed, %.loc7_27.1 [template = constants.%i32.builtin] // CHECK:STDOUT: adapt_decl %.loc7_27.2 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %i32 [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %i32.builtin [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%IntAdapter diff --git a/toolchain/check/testdata/class/adapter/fail_adapt_with_subobjects.carbon b/toolchain/check/testdata/class/adapter/fail_adapt_with_subobjects.carbon index 8a0867e15f7a..85d278e74ab4 100644 --- a/toolchain/check/testdata/class/adapter/fail_adapt_with_subobjects.carbon +++ b/toolchain/check/testdata/class/adapter/fail_adapt_with_subobjects.carbon @@ -79,18 +79,16 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %AdaptWithBase: type = class_type @AdaptWithBase [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %AdaptWithBase.elem: type = unbound_element_type %AdaptWithBase, %Base [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -108,7 +106,7 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -117,10 +115,8 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: // CHECK:STDOUT: class @AdaptWithBase { // 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: %.loc10_12.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc10_12.2: type = converted %int.make_type_signed, %.loc10_12.1 [template = constants.%i32] -// CHECK:STDOUT: adapt_decl %.loc10_12.2 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: adapt_decl %i32 [template] // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %.loc15: %AdaptWithBase.elem = base_decl %Base.ref, element [template] // CHECK:STDOUT: @@ -136,9 +132,7 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: constants { // CHECK:STDOUT: %AdaptWithField: type = class_type @AdaptWithField [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %AdaptWithField.elem: type = unbound_element_type %AdaptWithField, %i32 [template] // CHECK:STDOUT: %AdaptWithFields: type = class_type @AdaptWithFields [template] // CHECK:STDOUT: %AdaptWithFields.elem: type = unbound_element_type %AdaptWithFields, %i32 [template] @@ -146,7 +140,7 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -165,49 +159,37 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: // CHECK:STDOUT: class @AdaptWithField { // CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_32.loc8) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_12.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_12.2: type = converted %int.make_type_signed.loc8, %.loc8_12.1 [template = constants.%i32] -// CHECK:STDOUT: adapt_decl %.loc8_12.2 [template] +// CHECK:STDOUT: %i32.loc8: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: adapt_decl %i32.loc8 [template] // 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_10.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_signed.loc13, %.loc13_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8: %AdaptWithField.elem = field_decl n, element [template] +// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13: %AdaptWithField.elem = field_decl n, element [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AdaptWithField -// CHECK:STDOUT: .n = %.loc13_8 +// CHECK:STDOUT: .n = %.loc13 // CHECK:STDOUT: complete_type_witness = // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @AdaptWithFields { // 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_12.1: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32] -// CHECK:STDOUT: %.loc20_12.2: type = converted %int.make_type_signed.loc20, %.loc20_12.1 [template = constants.%i32] -// CHECK:STDOUT: adapt_decl %.loc20_12.2 [template] +// CHECK:STDOUT: %i32.loc20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: adapt_decl %i32.loc20 [template] // CHECK:STDOUT: %int_32.loc25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc25: init type = call constants.%Int(%int_32.loc25) [template = constants.%i32] -// CHECK:STDOUT: %.loc25_10.1: type = value_of_initializer %int.make_type_signed.loc25 [template = constants.%i32] -// CHECK:STDOUT: %.loc25_10.2: type = converted %int.make_type_signed.loc25, %.loc25_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc25_8: %AdaptWithFields.elem = field_decl a, element [template] +// CHECK:STDOUT: %i32.loc25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc25: %AdaptWithFields.elem = field_decl a, element [template] // CHECK:STDOUT: %int_32.loc26: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc26: init type = call constants.%Int(%int_32.loc26) [template = constants.%i32] -// CHECK:STDOUT: %.loc26_10.1: type = value_of_initializer %int.make_type_signed.loc26 [template = constants.%i32] -// CHECK:STDOUT: %.loc26_10.2: type = converted %int.make_type_signed.loc26, %.loc26_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc26_8: %AdaptWithFields.elem = field_decl b, element [template] +// CHECK:STDOUT: %i32.loc26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc26: %AdaptWithFields.elem = field_decl b, element [template] // CHECK:STDOUT: %int_32.loc27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc27: init type = call constants.%Int(%int_32.loc27) [template = constants.%i32] -// CHECK:STDOUT: %.loc27_10.1: type = value_of_initializer %int.make_type_signed.loc27 [template = constants.%i32] -// CHECK:STDOUT: %.loc27_10.2: type = converted %int.make_type_signed.loc27, %.loc27_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc27_8: %AdaptWithFields.elem = field_decl c, element [template] +// CHECK:STDOUT: %i32.loc27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc27: %AdaptWithFields.elem = field_decl c, element [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AdaptWithFields -// CHECK:STDOUT: .a = %.loc25_8 -// CHECK:STDOUT: .b = %.loc26_8 -// CHECK:STDOUT: .c = %.loc27_8 +// CHECK:STDOUT: .a = %.loc25 +// CHECK:STDOUT: .b = %.loc26 +// CHECK:STDOUT: .c = %.loc27 // CHECK:STDOUT: complete_type_witness = // CHECK:STDOUT: } // CHECK:STDOUT: @@ -216,19 +198,17 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %AdaptWithBaseAndFields: type = class_type @AdaptWithBaseAndFields [template] // CHECK:STDOUT: %AdaptWithBaseAndFields.elem.1: type = unbound_element_type %AdaptWithBaseAndFields, %Base [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %AdaptWithBaseAndFields.elem.2: type = unbound_element_type %AdaptWithBaseAndFields, %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -246,7 +226,7 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -257,10 +237,8 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %.loc7: %AdaptWithBaseAndFields.elem.1 = base_decl %Base.ref, element [template] // 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: %.loc8_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_10.2: type = converted %int.make_type_signed, %.loc8_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8: %AdaptWithBaseAndFields.elem.2 = field_decl n, element [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc8: %AdaptWithBaseAndFields.elem.2 = field_decl n, element [template] // CHECK:STDOUT: %.loc15_10: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc15_11: type = converted %.loc15_10, constants.%empty_struct_type [template = constants.%empty_struct_type] // CHECK:STDOUT: adapt_decl %.loc15_11 [template] @@ -268,7 +246,7 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AdaptWithBaseAndFields // CHECK:STDOUT: .base = %.loc7 -// CHECK:STDOUT: .n = %.loc8_8 +// CHECK:STDOUT: .n = %.loc8 // CHECK:STDOUT: extend %Base.ref // CHECK:STDOUT: complete_type_witness = // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/adapter/init_adapt.carbon b/toolchain/check/testdata/class/adapter/init_adapt.carbon index 7ab5d6abecf3..db23ec1c7ff9 100644 --- a/toolchain/check/testdata/class/adapter/init_adapt.carbon +++ b/toolchain/check/testdata/class/adapter/init_adapt.carbon @@ -96,24 +96,22 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %i32 [template] // CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.a.b.1 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.a.b.1 [template] // CHECK:STDOUT: %AdaptC: type = class_type @AdaptC [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %C.val: %C = struct_value (%int_1.2, %int_2.2) [template] @@ -126,7 +124,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -177,28 +175,24 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: // CHECK:STDOUT: class @C { // 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_10.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_signed.loc5, %.loc5_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_8: %C.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5: %C.elem = field_decl a, element0 [template] // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.2: type = converted %int.make_type_signed.loc6, %.loc6_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8: %C.elem = field_decl b, element1 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc6: %C.elem = field_decl b, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: .a = %.loc5_8 -// CHECK:STDOUT: .b = %.loc6_8 +// CHECK:STDOUT: .a = %.loc5 +// CHECK:STDOUT: .b = %.loc6 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @AdaptC { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: adapt_decl %C.ref [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AdaptC @@ -214,7 +208,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc13_27.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc13_27.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13_27.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13_27.1: = bound_method %int_1, %impl.elem0.loc13_27.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc13_27.1: = specific_function %Convert.bound.loc13_27.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc13_27.1: init %i32 = call %Convert.specific_fn.loc13_27.1(%int_1) [template = constants.%int_1.2] @@ -222,7 +216,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %.loc13_27.3: ref %C = temporary_storage // CHECK:STDOUT: %.loc13_27.4: ref %i32 = class_element_access %.loc13_27.3, element0 // CHECK:STDOUT: %.loc13_27.5: init %i32 = initialize_from %.loc13_27.2 to %.loc13_27.4 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc13_27.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13_27.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13_27.2: = bound_method %int_2, %impl.elem0.loc13_27.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc13_27.2: = specific_function %Convert.bound.loc13_27.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc13_27.2: init %i32 = call %Convert.specific_fn.loc13_27.2(%int_2) [template = constants.%int_2.2] @@ -266,24 +260,22 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %i32 [template] // CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.a.b.1 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.a.b.1 [template] // CHECK:STDOUT: %AdaptC: type = class_type @AdaptC [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %C.val: %C = struct_value (%int_1.2, %int_2.2) [template] @@ -296,7 +288,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -347,28 +339,24 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: // CHECK:STDOUT: class @C { // 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_10.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_signed.loc5, %.loc5_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_8: %C.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5: %C.elem = field_decl a, element0 [template] // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.2: type = converted %int.make_type_signed.loc6, %.loc6_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8: %C.elem = field_decl b, element1 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc6: %C.elem = field_decl b, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: .a = %.loc5_8 -// CHECK:STDOUT: .b = %.loc6_8 +// CHECK:STDOUT: .a = %.loc5 +// CHECK:STDOUT: .b = %.loc6 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @AdaptC { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: adapt_decl %C.ref [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%AdaptC @@ -384,7 +372,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc13_27.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc13_27.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13_27.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13_27.1: = bound_method %int_1, %impl.elem0.loc13_27.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc13_27.1: = specific_function %Convert.bound.loc13_27.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc13_27.1: init %i32 = call %Convert.specific_fn.loc13_27.1(%int_1) [template = constants.%int_1.2] @@ -392,7 +380,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %.loc13_27.3: ref %C = temporary_storage // CHECK:STDOUT: %.loc13_27.4: ref %i32 = class_element_access %.loc13_27.3, element0 // CHECK:STDOUT: %.loc13_27.5: init %i32 = initialize_from %.loc13_27.2 to %.loc13_27.4 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc13_27.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13_27.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13_27.2: = bound_method %int_2, %impl.elem0.loc13_27.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc13_27.2: = specific_function %Convert.bound.loc13_27.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc13_27.2: init %i32 = call %Convert.specific_fn.loc13_27.2(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/class/base.carbon b/toolchain/check/testdata/class/base.carbon index 59e5ed451ff4..1206470ba429 100644 --- a/toolchain/check/testdata/class/base.carbon +++ b/toolchain/check/testdata/class/base.carbon @@ -49,17 +49,15 @@ class Derived { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Base.elem: type = unbound_element_type %Base, %i32 [template] // CHECK:STDOUT: %struct_type.b.1: type = struct_type {.b: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.b.1 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.b.1 [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] // CHECK:STDOUT: %Derived.elem.1: type = unbound_element_type %Derived, %Base [template] // CHECK:STDOUT: %Derived.elem.2: type = unbound_element_type %Derived, %i32 [template] // CHECK:STDOUT: %struct_type.base.d.1: type = struct_type {.base: %Base, .d: %i32} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.d.1 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.base.d.1 [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %Make: %Make.type = struct_value () [template] // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] @@ -67,14 +65,14 @@ class Derived { // CHECK:STDOUT: %int_7.1: Core.IntLiteral = int_value 7 [template] // CHECK:STDOUT: %struct_type.base.d.3: type = struct_type {.base: %struct_type.b.2, .d: 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_4.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: %Base.val: %Base = struct_value (%int_4.2) [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_7.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_7.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_7.2: %i32 = int_value 7 [template] // CHECK:STDOUT: %Derived.val: %Derived = struct_value (%Base.val, %int_7.2) [template] @@ -87,7 +85,7 @@ class Derived { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -120,15 +118,11 @@ class Derived { // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] // CHECK:STDOUT: %int_32.loc17_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc17_27: init type = call constants.%Int(%int_32.loc17_27) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc17_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc17_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc17_32: init type = call constants.%Int(%int_32.loc17_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_35.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc17_27, %int.make_type_signed.loc17_32) -// CHECK:STDOUT: %.loc17_35.2: type = value_of_initializer %int.make_type_signed.loc17_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_35.3: type = converted %int.make_type_signed.loc17_27, %.loc17_35.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_35.4: type = value_of_initializer %int.make_type_signed.loc17_32 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_35.5: type = converted %int.make_type_signed.loc17_32, %.loc17_35.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_35.6: type = converted %.loc17_35.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc17_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc17_35.1: %tuple.type.1 = tuple_literal (%i32.loc17_27, %i32.loc17_32) +// CHECK:STDOUT: %.loc17_35.2: type = converted %.loc17_35.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %d.param: %Derived = value_param runtime_param0 // CHECK:STDOUT: %d: %Derived = bind_name d, %d.param // CHECK:STDOUT: %return.param: ref %tuple.type.2 = out_param runtime_param1 @@ -138,15 +132,13 @@ class Derived { // CHECK:STDOUT: // CHECK:STDOUT: class @Base { // 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_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_10.2: type = converted %int.make_type_signed, %.loc4_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_8: %Base.elem = field_decl b, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.b.1 [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc4: %Base.elem = field_decl b, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.b.1 [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base -// CHECK:STDOUT: .b = %.loc4_8 +// CHECK:STDOUT: .b = %.loc4 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -154,16 +146,14 @@ class Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %.loc8: %Derived.elem.1 = base_decl %Base.ref, element0 [template] // 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: %.loc10_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc10_10.2: type = converted %int.make_type_signed, %.loc10_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8: %Derived.elem.2 = field_decl d, element1 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.d.1 [template = constants.%complete_type.2] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc10: %Derived.elem.2 = field_decl d, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.d.1 [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived // CHECK:STDOUT: .base = %.loc8 -// CHECK:STDOUT: .d = %.loc10_8 +// CHECK:STDOUT: .d = %.loc10 // CHECK:STDOUT: extend %Base.ref // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } @@ -174,7 +164,7 @@ class Derived { // CHECK:STDOUT: %.loc14_26.1: %struct_type.b.2 = struct_literal (%int_4) // CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [template = constants.%int_7.1] // CHECK:STDOUT: %.loc14_35.1: %struct_type.base.d.3 = struct_literal (%.loc14_26.1, %int_7) -// CHECK:STDOUT: %impl.elem0.loc14_26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14_26: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_26: = bound_method %int_4, %impl.elem0.loc14_26 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc14_26: = specific_function %Convert.bound.loc14_26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc14_26: init %i32 = call %Convert.specific_fn.loc14_26(%int_4) [template = constants.%int_4.2] @@ -184,7 +174,7 @@ class Derived { // CHECK:STDOUT: %.loc14_26.4: init %i32 = initialize_from %.loc14_26.2 to %.loc14_26.3 [template = constants.%int_4.2] // CHECK:STDOUT: %.loc14_26.5: init %Base = class_init (%.loc14_26.4), %.loc14_35.2 [template = constants.%Base.val] // CHECK:STDOUT: %.loc14_35.3: init %Base = converted %.loc14_26.1, %.loc14_26.5 [template = constants.%Base.val] -// CHECK:STDOUT: %impl.elem0.loc14_35: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14_35: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_35: = bound_method %int_7, %impl.elem0.loc14_35 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc14_35: = specific_function %Convert.bound.loc14_35, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc14_35: init %i32 = call %Convert.specific_fn.loc14_35(%int_7) [template = constants.%int_7.2] @@ -199,14 +189,14 @@ class Derived { // CHECK:STDOUT: fn @Access(%d.param_patt: %Derived) -> %return.param_patt: %tuple.type.2 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %d.ref.loc18_11: %Derived = name_ref d, %d -// CHECK:STDOUT: %d.ref.loc18_12: %Derived.elem.2 = name_ref d, @Derived.%.loc10_8 [template = @Derived.%.loc10_8] +// CHECK:STDOUT: %d.ref.loc18_12: %Derived.elem.2 = name_ref d, @Derived.%.loc10 [template = @Derived.%.loc10] // CHECK:STDOUT: %.loc18_12.1: ref %i32 = class_element_access %d.ref.loc18_11, element1 // CHECK:STDOUT: %.loc18_12.2: %i32 = bind_value %.loc18_12.1 // CHECK:STDOUT: %d.ref.loc18_16: %Derived = name_ref d, %d // CHECK:STDOUT: %base.ref: %Derived.elem.1 = name_ref base, @Derived.%.loc8 [template = @Derived.%.loc8] // CHECK:STDOUT: %.loc18_17.1: ref %Base = class_element_access %d.ref.loc18_16, element0 // CHECK:STDOUT: %.loc18_17.2: %Base = bind_value %.loc18_17.1 -// CHECK:STDOUT: %b.ref: %Base.elem = name_ref b, @Base.%.loc4_8 [template = @Base.%.loc4_8] +// CHECK:STDOUT: %b.ref: %Base.elem = name_ref b, @Base.%.loc4 [template = @Base.%.loc4] // CHECK:STDOUT: %.loc18_22.1: ref %i32 = class_element_access %.loc18_17.2, element0 // CHECK:STDOUT: %.loc18_22.2: %i32 = bind_value %.loc18_22.1 // CHECK:STDOUT: %.loc18_24.1: %tuple.type.2 = tuple_literal (%.loc18_12.2, %.loc18_22.2) @@ -227,17 +217,15 @@ class Derived { // CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Derived.elem: type = unbound_element_type %Derived, %i32 [template] // CHECK:STDOUT: %struct_type.d: type = struct_type {.d: %i32} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.d [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.d [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -264,16 +252,14 @@ class Derived { // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { // 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: %.loc7_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc7_10.2: type = converted %int.make_type_signed, %.loc7_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8: %Derived.elem = field_decl d, element0 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc7: %Derived.elem = field_decl d, element0 [template] // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.d [template = constants.%complete_type.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.d [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived -// CHECK:STDOUT: .d = %.loc7_8 +// CHECK:STDOUT: .d = %.loc7 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/base_field.carbon b/toolchain/check/testdata/class/base_field.carbon index 135c9e53d683..52868facb66c 100644 --- a/toolchain/check/testdata/class/base_field.carbon +++ b/toolchain/check/testdata/class/base_field.carbon @@ -30,17 +30,15 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Base.elem: type = unbound_element_type %Base, %i32 [template] // CHECK:STDOUT: %struct_type.a.b.c: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.a.b.c [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.a.b.c [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] // CHECK:STDOUT: %Derived.elem.1: type = unbound_element_type %Derived, %Base [template] // CHECK:STDOUT: %Derived.elem.2: type = unbound_element_type %Derived, %i32 [template] // CHECK:STDOUT: %struct_type.base.d.e.1: type = struct_type {.base: %Base, .d: %i32, .e: %i32} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.d.e.1 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.base.d.e.1 [template] // CHECK:STDOUT: %ptr.2: type = ptr_type %Derived [template] // CHECK:STDOUT: %ptr.3: type = ptr_type %i32 [template] // CHECK:STDOUT: %Access.type: type = fn_type @Access [template] @@ -49,7 +47,7 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -74,9 +72,7 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] // CHECK:STDOUT: %ptr.loc24_21: type = ptr_type %Derived [template = constants.%ptr.2] // 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: %.loc24_30.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc24_30.2: type = converted %int.make_type_signed, %.loc24_30.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ptr.loc24_30: type = ptr_type %i32 [template = constants.%ptr.3] // CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 // CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param @@ -87,27 +83,21 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: // CHECK:STDOUT: class @Base { // 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: %.loc12_8: %Base.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12: %Base.elem = field_decl a, element0 [template] // 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_10.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_signed.loc13, %.loc13_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8: %Base.elem = field_decl b, element1 [template] +// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13: %Base.elem = field_decl b, element1 [template] // CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%int_32.loc14) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_10.1: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_10.2: type = converted %int.make_type_signed.loc14, %.loc14_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_8: %Base.elem = field_decl c, element2 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.c [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14: %Base.elem = field_decl c, element2 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.c [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base -// CHECK:STDOUT: .a = %.loc12_8 -// CHECK:STDOUT: .b = %.loc13_8 -// CHECK:STDOUT: .c = %.loc14_8 +// CHECK:STDOUT: .a = %.loc12 +// CHECK:STDOUT: .b = %.loc13 +// CHECK:STDOUT: .c = %.loc14 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -115,22 +105,18 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %.loc18: %Derived.elem.1 = base_decl %Base.ref, element0 [template] // 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_10.1: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32] -// CHECK:STDOUT: %.loc20_10.2: type = converted %int.make_type_signed.loc20, %.loc20_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc20_8: %Derived.elem.2 = field_decl d, element1 [template] +// CHECK:STDOUT: %i32.loc20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc20: %Derived.elem.2 = field_decl d, element1 [template] // CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_10.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_10.2: type = converted %int.make_type_signed.loc21, %.loc21_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_8: %Derived.elem.2 = field_decl e, element2 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.d.e.1 [template = constants.%complete_type.2] +// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc21: %Derived.elem.2 = field_decl e, element2 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.d.e.1 [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived // CHECK:STDOUT: .base = %.loc18 -// CHECK:STDOUT: .d = %.loc20_8 -// CHECK:STDOUT: .e = %.loc21_8 +// CHECK:STDOUT: .d = %.loc20 +// CHECK:STDOUT: .e = %.loc21 // CHECK:STDOUT: extend %Base.ref // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } @@ -139,7 +125,7 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p // CHECK:STDOUT: %.loc25_12: ref %Derived = deref %p.ref -// CHECK:STDOUT: %c.ref: %Base.elem = name_ref c, @Base.%.loc14_8 [template = @Base.%.loc14_8] +// CHECK:STDOUT: %c.ref: %Base.elem = name_ref c, @Base.%.loc14 [template = @Base.%.loc14] // CHECK:STDOUT: %.loc25_15.1: ref %Base = class_element_access %.loc25_12, element0 // CHECK:STDOUT: %.loc25_15.2: ref %Base = converted %.loc25_12, %.loc25_15.1 // CHECK:STDOUT: %.loc25_15.3: ref %i32 = class_element_access %.loc25_15.2, element2 diff --git a/toolchain/check/testdata/class/base_method.carbon b/toolchain/check/testdata/class/base_method.carbon index b2907d2d4fad..7e148f16e372 100644 --- a/toolchain/check/testdata/class/base_method.carbon +++ b/toolchain/check/testdata/class/base_method.carbon @@ -31,28 +31,26 @@ fn Call(p: Derived*) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Base.elem: type = unbound_element_type %Base, %i32 [template] // CHECK:STDOUT: %ptr.1: type = ptr_type %Base [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.a [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.a [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] // CHECK:STDOUT: %Derived.elem: type = unbound_element_type %Derived, %Base [template] // CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %Base} [template] -// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.base.1 [template] +// CHECK:STDOUT: %complete_type.5: = complete_type_witness %struct_type.base.1 [template] // CHECK:STDOUT: %ptr.3: type = ptr_type %Derived [template] // CHECK:STDOUT: %Call.type: type = fn_type @Call [template] // CHECK:STDOUT: %Call: %Call.type = struct_value () [template] @@ -61,7 +59,7 @@ fn Call(p: Derived*) { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -100,10 +98,8 @@ fn Call(p: Derived*) { // CHECK:STDOUT: // CHECK:STDOUT: class @Base { // 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: %.loc12_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed, %.loc12_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8: %Base.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12: %Base.elem = field_decl a, element0 [template] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 @@ -114,11 +110,11 @@ fn Call(p: Derived*) { // CHECK:STDOUT: %self.param.loc14: %ptr.1 = value_param runtime_param0 // CHECK:STDOUT: %self.loc14: %ptr.1 = bind_name self, %self.param.loc14 // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base -// CHECK:STDOUT: .a = %.loc12_8 +// CHECK:STDOUT: .a = %.loc12 // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } @@ -126,7 +122,7 @@ fn Call(p: Derived*) { // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %.loc22: %Derived.elem = base_decl %Base.ref, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -139,10 +135,10 @@ fn Call(p: Derived*) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %ptr.1 = name_ref self, %self.loc17 // CHECK:STDOUT: %.loc18_4: ref %Base = deref %self.ref -// CHECK:STDOUT: %a.ref: %Base.elem = name_ref a, @Base.%.loc12_8 [template = @Base.%.loc12_8] +// CHECK:STDOUT: %a.ref: %Base.elem = name_ref a, @Base.%.loc12 [template = @Base.%.loc12] // CHECK:STDOUT: %.loc18_10: ref %i32 = class_element_access %.loc18_4, element0 // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/class/base_method_qualified.carbon b/toolchain/check/testdata/class/base_method_qualified.carbon index a0eeac0e13a2..44f6e7397498 100644 --- a/toolchain/check/testdata/class/base_method_qualified.carbon +++ b/toolchain/check/testdata/class/base_method_qualified.carbon @@ -44,22 +44,20 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %Derived: type = class_type @Derived [template] // CHECK:STDOUT: %Base: type = class_type @Base [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %G.type.1: type = fn_type @G.1 [template] // CHECK:STDOUT: %G.1: %G.type.1 = struct_value () [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Derived.elem: type = unbound_element_type %Derived, %Base [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %G.type.2: type = fn_type @G.2 [template] // CHECK:STDOUT: %G.2: %G.type.2 = struct_value () [template] // CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %Base} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.base.1 [template] // CHECK:STDOUT: %Call.type: type = fn_type @Call [template] // CHECK:STDOUT: %Call: %Call.type = struct_value () [template] // CHECK:STDOUT: %ptr.3: type = ptr_type %Derived [template] @@ -73,7 +71,7 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -101,9 +99,7 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc11 [template = constants.%Derived] // 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: %.loc25_24.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc25_24.2: type = converted %int.make_type_signed, %.loc25_24.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %Derived = value_param runtime_param0 // CHECK:STDOUT: %a: %Derived = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -118,9 +114,7 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc11 [template = constants.%Derived] // CHECK:STDOUT: %ptr: type = ptr_type %Derived [template = constants.%ptr.3] // 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: %.loc29_33.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc29_33.2: type = converted %int.make_type_signed, %.loc29_33.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %p.param: %ptr.3 = value_param runtime_param0 // CHECK:STDOUT: %p: %ptr.3 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -134,9 +128,7 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc11 [template = constants.%Derived] // 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: %.loc33_37.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc33_37.2: type = converted %int.make_type_signed, %.loc33_37.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %Derived = value_param runtime_param0 // CHECK:STDOUT: %a: %Derived = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -151,9 +143,7 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc11 [template = constants.%Derived] // CHECK:STDOUT: %ptr: type = ptr_type %Derived [template = constants.%ptr.3] // 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: %.loc37_46.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc37_46.2: type = converted %int.make_type_signed, %.loc37_46.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %p.param: %ptr.3 = value_param runtime_param0 // CHECK:STDOUT: %p: %ptr.3 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -180,7 +170,7 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %self.param: %Derived = value_param runtime_param0 // CHECK:STDOUT: %self: %Derived = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -200,9 +190,7 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Base [template = constants.%Base] // 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: %.loc14_25.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_25.2: type = converted %int.make_type_signed, %.loc14_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param: %Base = value_param runtime_param0 // CHECK:STDOUT: %self: %Base = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -216,15 +204,13 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc11 [template = constants.%Derived] // 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: %.loc15_28.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_28.2: type = converted %int.make_type_signed, %.loc15_28.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param: %Derived = value_param runtime_param0 // CHECK:STDOUT: %self: %Derived = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base diff --git a/toolchain/check/testdata/class/basic.carbon b/toolchain/check/testdata/class/basic.carbon index 0eee260bce2b..ec52c5abbfa8 100644 --- a/toolchain/check/testdata/class/basic.carbon +++ b/toolchain/check/testdata/class/basic.carbon @@ -31,24 +31,22 @@ fn Run() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %i32 [template] // CHECK:STDOUT: %struct_type.k: type = struct_type {.k: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.k [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.k [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_4.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: } @@ -56,7 +54,7 @@ fn Run() -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -77,13 +75,9 @@ fn Run() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc21_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21_15: init type = call constants.%Int(%int_32.loc21_15) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_15.1: type = value_of_initializer %int.make_type_signed.loc21_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_15.2: type = converted %int.make_type_signed.loc21_15, %.loc21_15.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc21_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc21_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21_23: init type = call constants.%Int(%int_32.loc21_23) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_23.1: type = value_of_initializer %int.make_type_signed.loc21_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_23.2: type = converted %int.make_type_signed.loc21_23, %.loc21_23.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc21_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param.loc21: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n.loc21: %i32 = bind_name n, %n.param.loc21 // CHECK:STDOUT: %return.param.loc21: ref %i32 = out_param runtime_param1 @@ -94,16 +88,12 @@ fn Run() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc25_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc25_13.2: type = converted %int.make_type_signed, %.loc25_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [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: %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: %.loc25_17.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc25_17.2: type = converted %int.make_type_signed, %.loc25_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { @@ -114,13 +104,9 @@ fn Run() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc12_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc12_11: init type = call constants.%Int(%int_32.loc12_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_11.1: type = value_of_initializer %int.make_type_signed.loc12_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_11.2: type = converted %int.make_type_signed.loc12_11, %.loc12_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc12_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc12_19: init type = call constants.%Int(%int_32.loc12_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_19.1: type = value_of_initializer %int.make_type_signed.loc12_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_19.2: type = converted %int.make_type_signed.loc12_19, %.loc12_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -133,30 +119,24 @@ fn Run() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc16_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc16_11: init type = call constants.%Int(%int_32.loc16_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_11.1: type = value_of_initializer %int.make_type_signed.loc16_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_11.2: type = converted %int.make_type_signed.loc16_11, %.loc16_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc16_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc16_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc16_19: init type = call constants.%Int(%int_32.loc16_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %int.make_type_signed.loc16_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_19.2: type = converted %int.make_type_signed.loc16_19, %.loc16_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc16_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param.loc16: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n.loc16: %i32 = bind_name n, %n.param.loc16 // CHECK:STDOUT: %return.param.loc16: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return.loc16: ref %i32 = return_slot %return.param.loc16 // CHECK:STDOUT: } // 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: %.loc18_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc18_10.2: type = converted %int.make_type_signed, %.loc18_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_8: %Class.elem = field_decl k, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.k [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc18: %Class.elem = field_decl k, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.k [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: .k = %.loc18_8 +// CHECK:STDOUT: .k = %.loc18 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -177,7 +157,7 @@ fn Run() -> i32 { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %F.ref: %F.type = name_ref F, @Class.%F.decl [template = constants.%F] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_4, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_4) [template = constants.%int_4.2] diff --git a/toolchain/check/testdata/class/complete_in_member_fn.carbon b/toolchain/check/testdata/class/complete_in_member_fn.carbon index 9883a0491536..50b7d737294c 100644 --- a/toolchain/check/testdata/class/complete_in_member_fn.carbon +++ b/toolchain/check/testdata/class/complete_in_member_fn.carbon @@ -19,19 +19,17 @@ class C { // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %i32 [template] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.a [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -55,32 +53,28 @@ class C { // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // 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: %.loc12_17.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_17.2: type = converted %int.make_type_signed, %.loc12_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %c.param: %C = value_param runtime_param0 // CHECK:STDOUT: %c: %C = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // 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: %.loc14_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_10.2: type = converted %int.make_type_signed, %.loc14_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_8: %C.elem = field_decl a, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14: %C.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: .a = %.loc14_8 +// CHECK:STDOUT: .a = %.loc14 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%c.param_patt: %C) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref: %C = name_ref c, %c -// CHECK:STDOUT: %a.ref: %C.elem = name_ref a, @C.%.loc14_8 [template = @C.%.loc14_8] +// CHECK:STDOUT: %a.ref: %C.elem = name_ref a, @C.%.loc14 [template = @C.%.loc14] // CHECK:STDOUT: %.loc12_31.1: ref %i32 = class_element_access %c.ref, element0 // CHECK:STDOUT: %.loc12_31.2: %i32 = bind_value %.loc12_31.1 // CHECK:STDOUT: return %.loc12_31.2 diff --git a/toolchain/check/testdata/class/compound_field.carbon b/toolchain/check/testdata/class/compound_field.carbon index bc75232f9999..c0186b5d0d09 100644 --- a/toolchain/check/testdata/class/compound_field.carbon +++ b/toolchain/check/testdata/class/compound_field.carbon @@ -42,17 +42,15 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Base.elem: type = unbound_element_type %Base, %i32 [template] // CHECK:STDOUT: %struct_type.a.b.c: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.a.b.c [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.a.b.c [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] // CHECK:STDOUT: %Derived.elem.1: type = unbound_element_type %Derived, %Base [template] // CHECK:STDOUT: %Derived.elem.2: type = unbound_element_type %Derived, %i32 [template] // CHECK:STDOUT: %struct_type.base.d.e.1: type = struct_type {.base: %Base, .d: %i32, .e: %i32} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.d.e.1 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.base.d.e.1 [template] // CHECK:STDOUT: %AccessDerived.type: type = fn_type @AccessDerived [template] // CHECK:STDOUT: %AccessDerived: %AccessDerived.type = struct_value () [template] // CHECK:STDOUT: %AccessBase.type: type = fn_type @AccessBase [template] @@ -67,7 +65,7 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -94,9 +92,7 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref.loc24: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] // 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: %.loc24_33.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc24_33.2: type = converted %int.make_type_signed, %.loc24_33.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %d.param: %Derived = value_param runtime_param0 // CHECK:STDOUT: %d: %Derived = bind_name d, %d.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -110,9 +106,7 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] // 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: %.loc28_30.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc28_30.2: type = converted %int.make_type_signed, %.loc28_30.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %d.param: %Derived = value_param runtime_param0 // CHECK:STDOUT: %d: %Derived = bind_name d, %d.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -127,9 +121,7 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: %Derived.ref.loc32: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] // CHECK:STDOUT: %ptr.loc32_36: type = ptr_type %Derived [template = constants.%ptr.4] // 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: %.loc32_45.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc32_45.2: type = converted %int.make_type_signed, %.loc32_45.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ptr.loc32_45: type = ptr_type %i32 [template = constants.%ptr.5] // CHECK:STDOUT: %p.param: %ptr.4 = value_param runtime_param0 // CHECK:STDOUT: %p: %ptr.4 = bind_name p, %p.param @@ -145,9 +137,7 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] // CHECK:STDOUT: %ptr.loc36_33: type = ptr_type %Derived [template = constants.%ptr.4] // 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: %.loc36_42.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc36_42.2: type = converted %int.make_type_signed, %.loc36_42.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ptr.loc36_42: type = ptr_type %i32 [template = constants.%ptr.5] // CHECK:STDOUT: %p.param: %ptr.4 = value_param runtime_param0 // CHECK:STDOUT: %p: %ptr.4 = bind_name p, %p.param @@ -158,27 +148,21 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: // CHECK:STDOUT: class @Base { // 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: %.loc12_8: %Base.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12: %Base.elem = field_decl a, element0 [template] // 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_10.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_signed.loc13, %.loc13_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8: %Base.elem = field_decl b, element1 [template] +// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13: %Base.elem = field_decl b, element1 [template] // CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%int_32.loc14) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_10.1: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_10.2: type = converted %int.make_type_signed.loc14, %.loc14_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_8: %Base.elem = field_decl c, element2 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.c [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14: %Base.elem = field_decl c, element2 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.c [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base -// CHECK:STDOUT: .a = %.loc12_8 -// CHECK:STDOUT: .b = %.loc13_8 -// CHECK:STDOUT: .c = %.loc14_8 +// CHECK:STDOUT: .a = %.loc12 +// CHECK:STDOUT: .b = %.loc13 +// CHECK:STDOUT: .c = %.loc14 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -186,22 +170,18 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %.loc18: %Derived.elem.1 = base_decl %Base.ref, element0 [template] // 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_10.1: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32] -// CHECK:STDOUT: %.loc20_10.2: type = converted %int.make_type_signed.loc20, %.loc20_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc20_8: %Derived.elem.2 = field_decl d, element1 [template] +// CHECK:STDOUT: %i32.loc20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc20: %Derived.elem.2 = field_decl d, element1 [template] // CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_10.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_10.2: type = converted %int.make_type_signed.loc21, %.loc21_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_8: %Derived.elem.2 = field_decl e, element2 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.d.e.1 [template = constants.%complete_type.2] +// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc21: %Derived.elem.2 = field_decl e, element2 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.d.e.1 [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived // CHECK:STDOUT: .base = %.loc18 -// CHECK:STDOUT: .d = %.loc20_8 -// CHECK:STDOUT: .e = %.loc21_8 +// CHECK:STDOUT: .d = %.loc20 +// CHECK:STDOUT: .e = %.loc21 // CHECK:STDOUT: extend %Base.ref // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } @@ -210,7 +190,7 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %d.ref.loc25_10: %Derived = name_ref d, %d // CHECK:STDOUT: %Derived.ref.loc25: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %d.ref.loc25_20: %Derived.elem.2 = name_ref d, @Derived.%.loc20_8 [template = @Derived.%.loc20_8] +// CHECK:STDOUT: %d.ref.loc25_20: %Derived.elem.2 = name_ref d, @Derived.%.loc20 [template = @Derived.%.loc20] // CHECK:STDOUT: %.loc25_11.1: ref %i32 = class_element_access %d.ref.loc25_10, element1 // CHECK:STDOUT: %.loc25_11.2: %i32 = bind_value %.loc25_11.1 // CHECK:STDOUT: return %.loc25_11.2 @@ -220,7 +200,7 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %d.ref: %Derived = name_ref d, %d // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %b.ref: %Base.elem = name_ref b, @Base.%.loc13_8 [template = @Base.%.loc13_8] +// CHECK:STDOUT: %b.ref: %Base.elem = name_ref b, @Base.%.loc13 [template = @Base.%.loc13] // CHECK:STDOUT: %.loc29_11.1: ref %Base = class_element_access %d.ref, element0 // CHECK:STDOUT: %.loc29_11.2: ref %Base = converted %d.ref, %.loc29_11.1 // CHECK:STDOUT: %.loc29_11.3: ref %i32 = class_element_access %.loc29_11.2, element1 @@ -232,7 +212,7 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr.4 = name_ref p, %p // CHECK:STDOUT: %Derived.ref.loc33: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %d.ref: %Derived.elem.2 = name_ref d, @Derived.%.loc20_8 [template = @Derived.%.loc20_8] +// CHECK:STDOUT: %d.ref: %Derived.elem.2 = name_ref d, @Derived.%.loc20 [template = @Derived.%.loc20] // CHECK:STDOUT: %.loc33_12.1: ref %Derived = deref %p.ref // CHECK:STDOUT: %.loc33_12.2: ref %i32 = class_element_access %.loc33_12.1, element1 // CHECK:STDOUT: %addr: %ptr.5 = addr_of %.loc33_12.2 @@ -243,7 +223,7 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr.4 = name_ref p, %p // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %b.ref: %Base.elem = name_ref b, @Base.%.loc13_8 [template = @Base.%.loc13_8] +// CHECK:STDOUT: %b.ref: %Base.elem = name_ref b, @Base.%.loc13 [template = @Base.%.loc13] // CHECK:STDOUT: %.loc37_12.1: ref %Derived = deref %p.ref // CHECK:STDOUT: %.loc37_12.2: ref %Base = class_element_access %.loc37_12.1, element0 // CHECK:STDOUT: %.loc37_12.3: ref %Base = converted %.loc37_12.1, %.loc37_12.2 diff --git a/toolchain/check/testdata/class/derived_to_base.carbon b/toolchain/check/testdata/class/derived_to_base.carbon index fd48d738f92d..d21ea07f24b2 100644 --- a/toolchain/check/testdata/class/derived_to_base.carbon +++ b/toolchain/check/testdata/class/derived_to_base.carbon @@ -43,22 +43,20 @@ fn ConvertInit() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %A.elem: type = unbound_element_type %A, %i32 [template] // CHECK:STDOUT: %struct_type.a.1: type = struct_type {.a: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.a.1 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.a.1 [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %B.elem.1: type = unbound_element_type %B, %A [template] // CHECK:STDOUT: %B.elem.2: type = unbound_element_type %B, %i32 [template] // CHECK:STDOUT: %struct_type.base.b.1: type = struct_type {.base: %A, .b: %i32} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.b.1 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.base.b.1 [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %C.elem.1: type = unbound_element_type %C, %B [template] // CHECK:STDOUT: %C.elem.2: type = unbound_element_type %C, %i32 [template] // CHECK:STDOUT: %struct_type.base.c.1: type = struct_type {.base: %B, .c: %i32} [template] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.base.c.1 [template] +// CHECK:STDOUT: %complete_type.5: = complete_type_witness %struct_type.base.c.1 [template] // CHECK:STDOUT: %ptr.4: type = ptr_type %C [template] // CHECK:STDOUT: %ptr.5: type = ptr_type %B [template] // CHECK:STDOUT: %ConvertCToB.type: type = fn_type @ConvertCToB [template] @@ -81,18 +79,18 @@ fn ConvertInit() { // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %struct_type.base.c.3: type = struct_type {.base: %struct_type.base.b.3, .c: 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %A.val: %A = struct_value (%int_1.2) [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %B.val: %B = struct_value (%A.val, %int_2.2) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %C.val: %C = struct_value (%B.val, %int_3.2) [template] @@ -101,7 +99,7 @@ fn ConvertInit() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -197,15 +195,13 @@ fn ConvertInit() { // CHECK:STDOUT: // CHECK:STDOUT: class @A { // 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: %.loc12_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed, %.loc12_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8: %A.elem = field_decl a, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.1 [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12: %A.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.1 [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A -// CHECK:STDOUT: .a = %.loc12_8 +// CHECK:STDOUT: .a = %.loc12 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -213,16 +209,14 @@ fn ConvertInit() { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %.loc16: %B.elem.1 = base_decl %A.ref, element0 [template] // 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: %.loc17_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc17_10.2: type = converted %int.make_type_signed, %.loc17_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_8: %B.elem.2 = field_decl b, element1 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.b.1 [template = constants.%complete_type.2] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc17: %B.elem.2 = field_decl b, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.b.1 [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B // CHECK:STDOUT: .base = %.loc16 -// CHECK:STDOUT: .b = %.loc17_8 +// CHECK:STDOUT: .b = %.loc17 // CHECK:STDOUT: extend %A.ref // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } @@ -231,16 +225,14 @@ fn ConvertInit() { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %.loc21: %C.elem.1 = base_decl %B.ref, element0 [template] // 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: %.loc22_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc22_10.2: type = converted %int.make_type_signed, %.loc22_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc22_8: %C.elem.2 = field_decl c, element1 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.c.1 [template = constants.%complete_type.3] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc22: %C.elem.2 = field_decl c, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.c.1 [template = constants.%complete_type.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .base = %.loc21 -// CHECK:STDOUT: .c = %.loc22_8 +// CHECK:STDOUT: .c = %.loc22 // CHECK:STDOUT: extend %B.ref // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } @@ -310,7 +302,7 @@ fn ConvertInit() { // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc38_57.1: %struct_type.base.c.3 = struct_literal (%.loc38_48.1, %int_3) // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %impl.elem0.loc38_39: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc38_39: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc38_39: = bound_method %int_1, %impl.elem0.loc38_39 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc38_39: = specific_function %Convert.bound.loc38_39, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc38_39: init %i32 = call %Convert.specific_fn.loc38_39(%int_1) [template = constants.%int_1.2] @@ -322,7 +314,7 @@ fn ConvertInit() { // CHECK:STDOUT: %.loc38_39.4: init %i32 = initialize_from %.loc38_39.2 to %.loc38_39.3 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc38_39.5: init %A = class_init (%.loc38_39.4), %.loc38_48.2 [template = constants.%A.val] // CHECK:STDOUT: %.loc38_48.3: init %A = converted %.loc38_39.1, %.loc38_39.5 [template = constants.%A.val] -// CHECK:STDOUT: %impl.elem0.loc38_48: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc38_48: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc38_48: = bound_method %int_2, %impl.elem0.loc38_48 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc38_48: = specific_function %Convert.bound.loc38_48, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc38_48: init %i32 = call %Convert.specific_fn.loc38_48(%int_2) [template = constants.%int_2.2] @@ -331,7 +323,7 @@ fn ConvertInit() { // CHECK:STDOUT: %.loc38_48.6: init %i32 = initialize_from %.loc38_48.4 to %.loc38_48.5 [template = constants.%int_2.2] // CHECK:STDOUT: %.loc38_48.7: init %B = class_init (%.loc38_48.3, %.loc38_48.6), %.loc38_57.3 [template = constants.%B.val] // CHECK:STDOUT: %.loc38_57.4: init %B = converted %.loc38_48.1, %.loc38_48.7 [template = constants.%B.val] -// CHECK:STDOUT: %impl.elem0.loc38_57: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc38_57: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc38_57: = bound_method %int_3, %impl.elem0.loc38_57 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc38_57: = specific_function %Convert.bound.loc38_57, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc38_57: init %i32 = call %Convert.specific_fn.loc38_57(%int_3) [template = constants.%int_3.2] diff --git a/toolchain/check/testdata/class/fail_abstract.carbon b/toolchain/check/testdata/class/fail_abstract.carbon index 410dcef16b33..7d5dd15499e9 100644 --- a/toolchain/check/testdata/class/fail_abstract.carbon +++ b/toolchain/check/testdata/class/fail_abstract.carbon @@ -448,12 +448,10 @@ fn CallReturnAbstract() { // CHECK:STDOUT: %Derived: type = class_type @Derived [template] // CHECK:STDOUT: %Derived.elem.1: type = unbound_element_type %Derived, %Abstract [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Derived.elem.2: type = unbound_element_type %Derived, %i32 [template] // CHECK:STDOUT: %struct_type.base.d.1: type = struct_type {.base: %Abstract, .d: %i32} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.d.1 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.base.d.1 [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %Make: %Make.type = struct_value () [template] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] @@ -464,7 +462,7 @@ fn CallReturnAbstract() { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -502,16 +500,14 @@ fn CallReturnAbstract() { // CHECK:STDOUT: %Abstract.ref: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] // CHECK:STDOUT: %.loc8: %Derived.elem.1 = base_decl %Abstract.ref, element0 [template] // 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: %.loc10_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc10_10.2: type = converted %int.make_type_signed, %.loc10_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8: %Derived.elem.2 = field_decl d, element1 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.d.1 [template = constants.%complete_type.2] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc10: %Derived.elem.2 = field_decl d, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.d.1 [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived // CHECK:STDOUT: .base = %.loc8 -// CHECK:STDOUT: .d = %.loc10_8 +// CHECK:STDOUT: .d = %.loc10 // CHECK:STDOUT: extend %Abstract.ref // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } @@ -534,19 +530,17 @@ fn CallReturnAbstract() { // CHECK:STDOUT: %Derived: type = class_type @Derived [template] // CHECK:STDOUT: %Derived.elem.1: type = unbound_element_type %Derived, %Abstract [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Derived.elem.2: type = unbound_element_type %Derived, %i32 [template] // CHECK:STDOUT: %struct_type.base.d: type = struct_type {.base: %Abstract, .d: %i32} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.d [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.base.d [template] // CHECK:STDOUT: %Return.type: type = fn_type @Return [template] // CHECK:STDOUT: %Return: %Return.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -589,16 +583,14 @@ fn CallReturnAbstract() { // CHECK:STDOUT: %Abstract.ref: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] // CHECK:STDOUT: %.loc8: %Derived.elem.1 = base_decl %Abstract.ref, element0 [template] // 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: %.loc10_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc10_10.2: type = converted %int.make_type_signed, %.loc10_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8: %Derived.elem.2 = field_decl d, element1 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.d [template = constants.%complete_type.2] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc10: %Derived.elem.2 = field_decl d, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.d [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived // CHECK:STDOUT: .base = %.loc8 -// CHECK:STDOUT: .d = %.loc10_8 +// CHECK:STDOUT: .d = %.loc10 // CHECK:STDOUT: extend %Abstract.ref // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } @@ -614,24 +606,22 @@ fn CallReturnAbstract() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Abstract: type = class_type @Abstract [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Abstract.elem: type = unbound_element_type %Abstract, %i32 [template] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.a [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.a [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] // CHECK:STDOUT: %Derived.elem.1: type = unbound_element_type %Derived, %Abstract [template] // CHECK:STDOUT: %Derived.elem.2: type = unbound_element_type %Derived, %i32 [template] // CHECK:STDOUT: %struct_type.base.d.1: type = struct_type {.base: %Abstract, .d: %i32} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.d.1 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.base.d.1 [template] // CHECK:STDOUT: %Access.type: type = fn_type @Access [template] // CHECK:STDOUT: %Access: %Access.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -655,9 +645,7 @@ fn CallReturnAbstract() { // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] // 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: %.loc14_26.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_26.2: type = converted %int.make_type_signed, %.loc14_26.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %d.param: %Derived = value_param runtime_param0 // CHECK:STDOUT: %d: %Derived = bind_name d, %d.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -667,15 +655,13 @@ fn CallReturnAbstract() { // CHECK:STDOUT: // CHECK:STDOUT: class @Abstract { // 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: %.loc5_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_signed, %.loc5_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_8: %Abstract.elem = field_decl a, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5: %Abstract.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Abstract -// CHECK:STDOUT: .a = %.loc5_8 +// CHECK:STDOUT: .a = %.loc5 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -683,16 +669,14 @@ fn CallReturnAbstract() { // CHECK:STDOUT: %Abstract.ref: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] // CHECK:STDOUT: %.loc9: %Derived.elem.1 = base_decl %Abstract.ref, element0 [template] // 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_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_10.2: type = converted %int.make_type_signed, %.loc11_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_8: %Derived.elem.2 = field_decl d, element1 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.d.1 [template = constants.%complete_type.2] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11: %Derived.elem.2 = field_decl d, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.d.1 [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived // CHECK:STDOUT: .base = %.loc9 -// CHECK:STDOUT: .d = %.loc11_8 +// CHECK:STDOUT: .d = %.loc11 // CHECK:STDOUT: extend %Abstract.ref // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/fail_base_bad_type.carbon b/toolchain/check/testdata/class/fail_base_bad_type.carbon index fe003970a5f3..a8507308fa66 100644 --- a/toolchain/check/testdata/class/fail_base_bad_type.carbon +++ b/toolchain/check/testdata/class/fail_base_bad_type.carbon @@ -54,15 +54,12 @@ class DeriveFromi32 { // It's not really important whether this conversion produces an error or not, // but it shouldn't crash. -// CHECK:STDERR: fail_derive_from_i32.carbon:[[@LINE+7]]:53: error: cannot implicitly convert from `DeriveFromi32*` to `i32*` [ImplicitAsConversionFailure] -// CHECK:STDERR: fn ConvertToBadBasei32(p: DeriveFromi32*) -> i32* { return p; } -// CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_derive_from_i32.carbon:[[@LINE+4]]:53: note: type `DeriveFromi32*` does not implement interface `Core.ImplicitAs(i32*)` [MissingImplInMemberAccessNote] -// CHECK:STDERR: fn ConvertToBadBasei32(p: DeriveFromi32*) -> i32* { return p; } -// CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fn ConvertToBadBasei32(p: DeriveFromi32*) -> i32* { return p; } +// CHECK:STDERR: fail_derive_from_i32.carbon:[[@LINE+4]]:70: error: member name `n` not found in `DeriveFromi32` [MemberNameNotFoundInScope] +// CHECK:STDERR: fn AccessMemberWithInvalidBasei32(p: DeriveFromi32*) -> i32 { return (*p).n; } +// CHECK:STDERR: ^~~~~~ +// CHECK:STDERR: fn AccessMemberWithInvalidBasei32(p: DeriveFromi32*) -> i32 { return (*p).n; } // --- fail_derive_from_tuple.carbon @@ -186,16 +183,14 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %DeriveFromError: type = class_type @DeriveFromError [template] // CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromError [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseError.type: type = fn_type @AccessMemberWithInvalidBaseError [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseError: %AccessMemberWithInvalidBaseError.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -218,9 +213,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %DeriveFromError.ref: type = name_ref DeriveFromError, file.%DeriveFromError.decl [template = constants.%DeriveFromError] // CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromError [template = constants.%ptr] // 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_61.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_61.2: type = converted %int.make_type_signed, %.loc13_61.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %p.param: %ptr = value_param runtime_param0 // CHECK:STDOUT: %p: %ptr = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -243,7 +236,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: fn @AccessMemberWithInvalidBaseError(%p.param_patt: %ptr) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr = name_ref p, %p -// CHECK:STDOUT: %.loc13_75: ref %DeriveFromError = deref %p.ref +// CHECK:STDOUT: %.loc13: ref %DeriveFromError = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -254,9 +247,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %DeriveFromNonType: type = class_type @DeriveFromNonType [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromNonType [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %AccessMemberWithInvalidBasNonType.type: type = fn_type @AccessMemberWithInvalidBasNonType [template] // CHECK:STDOUT: %AccessMemberWithInvalidBasNonType: %AccessMemberWithInvalidBasNonType.type = struct_value () [template] // CHECK:STDOUT: } @@ -264,7 +255,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .ImplicitAs = %import_ref.1 -// CHECK:STDOUT: .Int = %import_ref.37 +// CHECK:STDOUT: .Int = %import_ref.7 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -287,9 +278,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %DeriveFromNonType.ref: type = name_ref DeriveFromNonType, file.%DeriveFromNonType.decl [template = constants.%DeriveFromNonType] // CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromNonType [template = constants.%ptr] // 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: %.loc15_64.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_64.2: type = converted %int.make_type_signed, %.loc15_64.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %p.param: %ptr = value_param runtime_param0 // CHECK:STDOUT: %p: %ptr = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -313,7 +302,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: fn @AccessMemberWithInvalidBasNonType(%p.param_patt: %ptr) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr = name_ref p, %p -// CHECK:STDOUT: %.loc15_78: ref %DeriveFromNonType = deref %p.ref +// CHECK:STDOUT: %.loc15: ref %DeriveFromNonType = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -323,9 +312,10 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %DeriveFromi32: type = class_type @DeriveFromi32 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %DeriveFromi32.elem: type = unbound_element_type %DeriveFromi32, %i32 [template] +// CHECK:STDOUT: %struct_type.base: type = struct_type {.base: %i32} [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.base [template] // CHECK:STDOUT: %ptr.1: type = ptr_type %DeriveFromi32 [template] // CHECK:STDOUT: %ptr.2: type = ptr_type %i32 [template] // CHECK:STDOUT: %ConvertToBadBasei32.type: type = fn_type @ConvertToBadBasei32 [template] @@ -337,7 +327,6 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -359,12 +348,10 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %return.param_patt: %ptr.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromi32.ref: type = name_ref DeriveFromi32, file.%DeriveFromi32.decl [template = constants.%DeriveFromi32] -// CHECK:STDOUT: %ptr.loc21_40: type = ptr_type %DeriveFromi32 [template = constants.%ptr.1] +// CHECK:STDOUT: %ptr.loc14_40: type = ptr_type %DeriveFromi32 [template = constants.%ptr.1] // 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: %.loc21_49.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc21_49.2: type = converted %int.make_type_signed, %.loc21_49.1 [template = constants.%i32] -// CHECK:STDOUT: %ptr.loc21_49: type = ptr_type %i32 [template = constants.%ptr.2] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %ptr.loc14_49: type = ptr_type %i32 [template = constants.%ptr.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 %ptr.2 = out_param runtime_param1 @@ -379,9 +366,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %DeriveFromi32.ref: type = name_ref DeriveFromi32, file.%DeriveFromi32.decl [template = constants.%DeriveFromi32] // CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromi32 [template = constants.%ptr.1] // 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: %.loc23_57.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc23_57.2: type = converted %int.make_type_signed, %.loc23_57.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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 %i32 = out_param runtime_param1 @@ -391,30 +376,31 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: class @DeriveFromi32 { // 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: %.loc9_16.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc9_16.2: type = converted %int.make_type_signed, %.loc9_16.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_19: = base_decl , element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness [template = ] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc9: %DeriveFromi32.elem = base_decl %i32, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%DeriveFromi32 -// CHECK:STDOUT: .base = %.loc9_19 -// CHECK:STDOUT: has_error +// CHECK:STDOUT: .base = %.loc9 +// CHECK:STDOUT: extend %i32 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @ConvertToBadBasei32(%p.param_patt: %ptr.1) -> %ptr.2 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr.1 = name_ref p, %p -// CHECK:STDOUT: %.loc21_61: %ptr.2 = converted %p.ref, [template = ] -// CHECK:STDOUT: return +// CHECK:STDOUT: %.loc14_61.1: ref %DeriveFromi32 = deref %p.ref +// CHECK:STDOUT: %.loc14_61.2: ref %i32 = class_element_access %.loc14_61.1, element0 +// CHECK:STDOUT: %addr: %ptr.2 = addr_of %.loc14_61.2 +// CHECK:STDOUT: %.loc14_61.3: %ptr.2 = converted %p.ref, %addr +// CHECK:STDOUT: return %.loc14_61.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @AccessMemberWithInvalidBasei32(%p.param_patt: %ptr.1) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr.1 = name_ref p, %p -// CHECK:STDOUT: %.loc23_71: ref %DeriveFromi32 = deref %p.ref +// CHECK:STDOUT: %.loc20: ref %DeriveFromi32 = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -424,7 +410,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %DeriveFromTuple: type = class_type @DeriveFromTuple [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%Base) [template] @@ -433,9 +419,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %ConvertToBadBaseTuple.type: type = fn_type @ConvertToBadBaseTuple [template] // CHECK:STDOUT: %ConvertToBadBaseTuple: %ConvertToBadBaseTuple.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseTuple.type: type = fn_type @AccessMemberWithInvalidBaseTuple [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseTuple: %AccessMemberWithInvalidBaseTuple.type = struct_value () [template] // CHECK:STDOUT: } @@ -443,7 +427,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .ImplicitAs = %import_ref.1 -// CHECK:STDOUT: .Int = %import_ref.37 +// CHECK:STDOUT: .Int = %import_ref.7 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -486,9 +470,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %DeriveFromTuple.ref: type = name_ref DeriveFromTuple, file.%DeriveFromTuple.decl [template = constants.%DeriveFromTuple] // CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromTuple [template = constants.%ptr.2] // 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: %.loc23_61.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc23_61.2: type = converted %int.make_type_signed, %.loc23_61.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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 %i32 = out_param runtime_param1 @@ -497,7 +479,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base @@ -528,7 +510,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: fn @AccessMemberWithInvalidBaseTuple(%p.param_patt: %ptr.2) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p -// CHECK:STDOUT: %.loc23_75: ref %DeriveFromTuple = deref %p.ref +// CHECK:STDOUT: %.loc23: ref %DeriveFromTuple = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -538,9 +520,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %DeriveFromStruct: type = class_type @DeriveFromStruct [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template] // CHECK:STDOUT: %ptr.1: type = ptr_type %struct_type.a.b [template] // CHECK:STDOUT: %ptr.2: type = ptr_type %DeriveFromStruct [template] @@ -553,7 +533,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -577,13 +557,9 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %DeriveFromStruct.ref: type = name_ref DeriveFromStruct, file.%DeriveFromStruct.decl [template = constants.%DeriveFromStruct] // CHECK:STDOUT: %ptr.loc21_46: type = ptr_type %DeriveFromStruct [template = constants.%ptr.2] // CHECK:STDOUT: %int_32.loc21_57: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21_57: init type = call constants.%Int(%int_32.loc21_57) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_57.1: type = value_of_initializer %int.make_type_signed.loc21_57 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_57.2: type = converted %int.make_type_signed.loc21_57, %.loc21_57.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc21_57: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc21_66: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21_66: init type = call constants.%Int(%int_32.loc21_66) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_66.1: type = value_of_initializer %int.make_type_signed.loc21_66 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_66.2: type = converted %int.make_type_signed.loc21_66, %.loc21_66.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc21_66: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b] // CHECK:STDOUT: %ptr.loc21_70: type = ptr_type %struct_type.a.b [template = constants.%ptr.1] // CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 @@ -600,9 +576,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %DeriveFromStruct.ref: type = name_ref DeriveFromStruct, file.%DeriveFromStruct.decl [template = constants.%DeriveFromStruct] // CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromStruct [template = constants.%ptr.2] // 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: %.loc24_63.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc24_63.2: type = converted %int.make_type_signed, %.loc24_63.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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 %i32 = out_param runtime_param1 @@ -612,20 +586,16 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: class @DeriveFromStruct { // CHECK:STDOUT: %int_32.loc11_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_21: init type = call constants.%Int(%int_32.loc11_21) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_21.1: type = value_of_initializer %int.make_type_signed.loc11_21 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_21.2: type = converted %int.make_type_signed.loc11_21, %.loc11_21.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_30: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_30: init type = call constants.%Int(%int_32.loc11_30) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_30.1: type = value_of_initializer %int.make_type_signed.loc11_30 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_30.2: type = converted %int.make_type_signed.loc11_30, %.loc11_30.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_30: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b] -// CHECK:STDOUT: %.loc11_34: = base_decl , element0 [template] +// CHECK:STDOUT: %.loc11: = base_decl , element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%DeriveFromStruct -// CHECK:STDOUT: .base = %.loc11_34 +// CHECK:STDOUT: .base = %.loc11 // CHECK:STDOUT: has_error // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } @@ -633,14 +603,14 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: fn @ConvertToBadBaseStruct(%p.param_patt: %ptr.2) -> %ptr.1 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p -// CHECK:STDOUT: %.loc21_82: %ptr.1 = converted %p.ref, [template = ] +// CHECK:STDOUT: %.loc21: %ptr.1 = converted %p.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @AccessMemberWithInvalidBaseStruct(%p.param_patt: %ptr.2) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p -// CHECK:STDOUT: %.loc24_77: ref %DeriveFromStruct = deref %p.ref +// CHECK:STDOUT: %.loc24: ref %DeriveFromStruct = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -655,9 +625,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %ConvertToBadBaseIncomplete.type: type = fn_type @ConvertToBadBaseIncomplete [template] // CHECK:STDOUT: %ConvertToBadBaseIncomplete: %ConvertToBadBaseIncomplete.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseIncomplete.type: type = fn_type @AccessMemberWithInvalidBaseIncomplete [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseIncomplete: %AccessMemberWithInvalidBaseIncomplete.type = struct_value () [template] // CHECK:STDOUT: } @@ -665,7 +633,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .ImplicitAs = %import_ref.1 -// CHECK:STDOUT: .Int = %import_ref.37 +// CHECK:STDOUT: .Int = %import_ref.7 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -706,9 +674,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %DeriveFromIncomplete.ref: type = name_ref DeriveFromIncomplete, file.%DeriveFromIncomplete.decl [template = constants.%DeriveFromIncomplete] // CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromIncomplete [template = constants.%ptr.1] // 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: %.loc30_71.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc30_71.2: type = converted %int.make_type_signed, %.loc30_71.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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 %i32 = out_param runtime_param1 @@ -740,7 +706,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: fn @AccessMemberWithInvalidBaseIncomplete(%p.param_patt: %ptr.1) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr.1 = name_ref p, %p -// CHECK:STDOUT: %.loc30_85: ref %DeriveFromIncomplete = deref %p.ref +// CHECK:STDOUT: %.loc30: ref %DeriveFromIncomplete = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -750,16 +716,14 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Final: type = class_type @Final [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Final.elem: type = unbound_element_type %Final, %i32 [template] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.a [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.a [template] // CHECK:STDOUT: %DeriveFromFinal: type = class_type @DeriveFromFinal [template] // CHECK:STDOUT: %DeriveFromFinal.elem: type = unbound_element_type %DeriveFromFinal, %Final [template] // CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %Final} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.base.1 [template] // CHECK:STDOUT: %ptr.2: type = ptr_type %DeriveFromFinal [template] // CHECK:STDOUT: %ptr.3: type = ptr_type %Final [template] // CHECK:STDOUT: %ConvertToBadBaseFinal.type: type = fn_type @ConvertToBadBaseFinal [template] @@ -772,7 +736,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -814,9 +778,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %DeriveFromFinal.ref: type = name_ref DeriveFromFinal, file.%DeriveFromFinal.decl [template = constants.%DeriveFromFinal] // CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromFinal [template = constants.%ptr.2] // 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: %.loc21_72.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc21_72.2: type = converted %int.make_type_signed, %.loc21_72.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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 %i32 = out_param runtime_param1 @@ -831,9 +793,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %DeriveFromFinal.ref: type = name_ref DeriveFromFinal, file.%DeriveFromFinal.decl [template = constants.%DeriveFromFinal] // CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromFinal [template = constants.%ptr.2] // 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: %.loc25_70.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc25_70.2: type = converted %int.make_type_signed, %.loc25_70.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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 %i32 = out_param runtime_param1 @@ -843,22 +803,20 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: class @Final { // 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: %.loc5_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc5_10.2: type = converted %int.make_type_signed, %.loc5_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_8: %Final.elem = field_decl a, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5: %Final.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Final -// CHECK:STDOUT: .a = %.loc5_8 +// CHECK:STDOUT: .a = %.loc5 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @DeriveFromFinal { // CHECK:STDOUT: %Final.ref: type = name_ref Final, file.%Final.decl [template = constants.%Final] // CHECK:STDOUT: %.loc13: %DeriveFromFinal.elem = base_decl %Final.ref, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%DeriveFromFinal @@ -881,7 +839,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p // CHECK:STDOUT: %.loc22_11: ref %DeriveFromFinal = deref %p.ref -// CHECK:STDOUT: %a.ref: %Final.elem = name_ref a, @Final.%.loc5_8 [template = @Final.%.loc5_8] +// CHECK:STDOUT: %a.ref: %Final.elem = name_ref a, @Final.%.loc5 [template = @Final.%.loc5] // CHECK:STDOUT: %.loc22_14.1: ref %Final = class_element_access %.loc22_11, element0 // CHECK:STDOUT: %.loc22_14.2: ref %Final = converted %.loc22_11, %.loc22_14.1 // CHECK:STDOUT: %.loc22_14.3: ref %i32 = class_element_access %.loc22_14.2, element0 diff --git a/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon b/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon index 80224c35fc37..6cddd1cf7dc8 100644 --- a/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon +++ b/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon @@ -31,16 +31,14 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %A.elem: type = unbound_element_type %A, %i32 [template] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.a [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.a [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %B.elem: type = unbound_element_type %B, %i32 [template] // CHECK:STDOUT: %struct_type.b: type = struct_type {.b: %i32} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.b [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.b [template] // CHECK:STDOUT: %AccessBInA.type: type = fn_type @AccessBInA [template] // CHECK:STDOUT: %AccessBInA: %AccessBInA.type = struct_value () [template] // CHECK:STDOUT: } @@ -48,7 +46,7 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -72,9 +70,7 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // 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: %.loc19_24.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc19_24.2: type = converted %int.make_type_signed, %.loc19_24.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %A = value_param runtime_param0 // CHECK:STDOUT: %a: %A = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -84,29 +80,25 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: class @A { // 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: %.loc12_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed, %.loc12_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8: %A.elem = field_decl a, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12: %A.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A -// CHECK:STDOUT: .a = %.loc12_8 +// CHECK:STDOUT: .a = %.loc12 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { // 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: %.loc16_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_10.2: type = converted %int.make_type_signed, %.loc16_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_8: %B.elem = field_decl b, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.b [template = constants.%complete_type.2] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc16: %B.elem = field_decl b, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.b [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B -// CHECK:STDOUT: .b = %.loc16_8 +// CHECK:STDOUT: .b = %.loc16 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -114,7 +106,7 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %A = name_ref a, %a // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %b.ref: %B.elem = name_ref b, @B.%.loc16_8 [template = @B.%.loc16_8] +// CHECK:STDOUT: %b.ref: %B.elem = name_ref b, @B.%.loc16 [template = @B.%.loc16] // CHECK:STDOUT: %.loc26_11.1: %B = converted %a.ref, [template = ] // CHECK:STDOUT: %.loc26_11.2: %i32 = class_element_access , element0 [template = ] // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/class/fail_derived_to_base.carbon b/toolchain/check/testdata/class/fail_derived_to_base.carbon index 2d9ef7c6f38b..a4cbf0c1d80a 100644 --- a/toolchain/check/testdata/class/fail_derived_to_base.carbon +++ b/toolchain/check/testdata/class/fail_derived_to_base.carbon @@ -45,19 +45,17 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: constants { // CHECK:STDOUT: %A1: type = class_type @A1 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %A1.elem: type = unbound_element_type %A1, %i32 [template] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.a [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.a [template] // CHECK:STDOUT: %A2: type = class_type @A2 [template] // CHECK:STDOUT: %A2.elem: type = unbound_element_type %A2, %i32 [template] // CHECK:STDOUT: %B2: type = class_type @B2 [template] // CHECK:STDOUT: %B2.elem.1: type = unbound_element_type %B2, %A2 [template] // CHECK:STDOUT: %B2.elem.2: type = unbound_element_type %B2, %i32 [template] // CHECK:STDOUT: %struct_type.base.b.1: type = struct_type {.base: %A2, .b: %i32} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.b.1 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.base.b.1 [template] // CHECK:STDOUT: %ptr.2: type = ptr_type %B2 [template] // CHECK:STDOUT: %ptr.3: type = ptr_type %A1 [template] // CHECK:STDOUT: %ConvertUnrelated.type: type = fn_type @ConvertUnrelated [template] @@ -72,7 +70,7 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -127,29 +125,25 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: // CHECK:STDOUT: class @A1 { // 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: %.loc12_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed, %.loc12_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8: %A1.elem = field_decl a, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12: %A1.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A1 -// CHECK:STDOUT: .a = %.loc12_8 +// CHECK:STDOUT: .a = %.loc12 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A2 { // 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: %.loc16_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_10.2: type = converted %int.make_type_signed, %.loc16_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_8: %A2.elem = field_decl a, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc16: %A2.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A2 -// CHECK:STDOUT: .a = %.loc16_8 +// CHECK:STDOUT: .a = %.loc16 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -157,16 +151,14 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: %A2.ref: type = name_ref A2, file.%A2.decl [template = constants.%A2] // CHECK:STDOUT: %.loc20: %B2.elem.1 = base_decl %A2.ref, element0 [template] // 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: %.loc21_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc21_10.2: type = converted %int.make_type_signed, %.loc21_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_8: %B2.elem.2 = field_decl b, element1 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.b.1 [template = constants.%complete_type.2] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc21: %B2.elem.2 = field_decl b, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.b.1 [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B2 // CHECK:STDOUT: .base = %.loc20 -// CHECK:STDOUT: .b = %.loc21_8 +// CHECK:STDOUT: .b = %.loc21 // CHECK:STDOUT: extend %A2.ref // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/fail_field_modifiers.carbon b/toolchain/check/testdata/class/fail_field_modifiers.carbon index 9277231dc92a..45a26d9633d0 100644 --- a/toolchain/check/testdata/class/fail_field_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_field_modifiers.carbon @@ -39,30 +39,28 @@ class Class { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %i32 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %struct_type.j.k: type = struct_type {.j: %i32, .k: %i32} [template] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.j.k [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.j.k [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -79,21 +77,15 @@ class Class { // CHECK:STDOUT: // CHECK:STDOUT: class @Class { // CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%int_32.loc17) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_18.1: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_18.2: type = converted %int.make_type_signed.loc17, %.loc17_18.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_16: %Class.elem = field_decl j, element0 [template] +// CHECK:STDOUT: %i32.loc17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc17: %Class.elem = field_decl j, element0 [template] // CHECK:STDOUT: %int_32.loc23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc23: init type = call constants.%Int(%int_32.loc23) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_16.1: type = value_of_initializer %int.make_type_signed.loc23 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_16.2: type = converted %int.make_type_signed.loc23, %.loc23_16.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_14: %Class.elem = field_decl k, element1 [template] +// CHECK:STDOUT: %i32.loc23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc23: %Class.elem = field_decl k, element1 [template] // CHECK:STDOUT: %int_32.loc29: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc29: init type = call constants.%Int(%int_32.loc29) [template = constants.%i32] -// CHECK:STDOUT: %.loc29_18.1: type = value_of_initializer %int.make_type_signed.loc29 [template = constants.%i32] -// CHECK:STDOUT: %.loc29_18.2: type = converted %int.make_type_signed.loc29, %.loc29_18.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc29: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc29: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc29: = bound_method %int_0, %impl.elem0.loc29 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc29: = specific_function %Convert.bound.loc29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc29: init %i32 = call %Convert.specific_fn.loc29(%int_0) [template = constants.%int_0.2] @@ -101,23 +93,21 @@ class Class { // CHECK:STDOUT: %.loc29_25.2: %i32 = converted %int_0, %.loc29_25.1 [template = constants.%int_0.2] // CHECK:STDOUT: %l: %i32 = bind_name l, %.loc29_25.2 // CHECK:STDOUT: %int_32.loc34: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc34: init type = call constants.%Int(%int_32.loc34) [template = constants.%i32] -// CHECK:STDOUT: %.loc34_16.1: type = value_of_initializer %int.make_type_signed.loc34 [template = constants.%i32] -// CHECK:STDOUT: %.loc34_16.2: type = converted %int.make_type_signed.loc34, %.loc34_16.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc34: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc34: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc34: = bound_method %int_1, %impl.elem0.loc34 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc34: = specific_function %Convert.bound.loc34, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc34: init %i32 = call %Convert.specific_fn.loc34(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc34_23.1: %i32 = value_of_initializer %int.convert_checked.loc34 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc34_23.2: %i32 = converted %int_1, %.loc34_23.1 [template = constants.%int_1.2] // CHECK:STDOUT: %m: %i32 = bind_name m, %.loc34_23.2 -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.j.k [template = constants.%complete_type.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.j.k [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class -// CHECK:STDOUT: .j = %.loc17_16 -// CHECK:STDOUT: .k = %.loc23_14 +// CHECK:STDOUT: .j = %.loc17 +// CHECK:STDOUT: .k = %.loc23 // CHECK:STDOUT: .l = %l // CHECK:STDOUT: .m = %m // CHECK:STDOUT: complete_type_witness = %complete_type diff --git a/toolchain/check/testdata/class/fail_generic_method.carbon b/toolchain/check/testdata/class/fail_generic_method.carbon index 699ee973995c..159e1833d04d 100644 --- a/toolchain/check/testdata/class/fail_generic_method.carbon +++ b/toolchain/check/testdata/class/fail_generic_method.carbon @@ -39,25 +39,23 @@ fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic] -// CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic] +// CHECK:STDOUT: %require_complete.1: = require_complete_type %T [symbolic] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F, @Class(%T) [symbolic] // CHECK:STDOUT: %F: %F.type = struct_value () [symbolic] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %T} [symbolic] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [symbolic] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.a [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, %int_32 [template] -// CHECK:STDOUT: %N: %i32 = bind_symbolic_name N, 0 [symbolic] -// CHECK:STDOUT: %N.patt: %i32 = symbolic_binding_pattern N, 0 [symbolic] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %N.2: %i32 = bind_symbolic_name N, 0 [symbolic] +// CHECK:STDOUT: %N.patt.2: %i32 = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] // CHECK:STDOUT: %.1: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -83,11 +81,9 @@ fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDOUT: %n.param_patt: = value_param_pattern %n.patt, runtime_param1 // CHECK:STDOUT: } { // 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: %.loc32_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc32_14.2: type = converted %int.make_type_signed, %.loc32_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param -// CHECK:STDOUT: %N.loc32_10.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc32_10.2 (constants.%N)] +// CHECK:STDOUT: %N.loc32_10.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc32_10.2 (constants.%N.2)] // CHECK:STDOUT: %Self.ref: = name_ref Self, [template = ] // CHECK:STDOUT: %T.ref: = name_ref T, [template = ] // CHECK:STDOUT: %self.param: = value_param runtime_param0 @@ -102,13 +98,13 @@ fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDOUT: %T.patt.loc11_13.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_13.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type @Class.%T.loc11_13.2 (%T) [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type @Class.%T.loc11_13.2 (%T) [symbolic = %require_complete (constants.%require_complete.1)] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc11_13.2) [symbolic = %Class (constants.%Class)] // CHECK:STDOUT: %Class.elem: type = unbound_element_type @Class.%Class (%Class), @Class.%T.loc11_13.2 (%T) [symbolic = %Class.elem (constants.%Class.elem)] // CHECK:STDOUT: %F.type: type = fn_type @F, @Class(%T.loc11_13.2) [symbolic = %F.type (constants.%F.type)] // CHECK:STDOUT: %F: @Class.%F.type (%F.type) = struct_value () [symbolic = %F (constants.%F)] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: @Class.%T.loc11_13.2 (%T)} [symbolic = %struct_type.a (constants.%struct_type.a)] -// CHECK:STDOUT: %complete_type.loc14_1.2: = complete_type_witness @Class.%struct_type.a (%struct_type.a) [symbolic = %complete_type.loc14_1.2 (constants.%complete_type)] +// CHECK:STDOUT: %complete_type.loc14_1.2: = complete_type_witness @Class.%struct_type.a (%struct_type.a) [symbolic = %complete_type.loc14_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_13.1 [symbolic = %T.loc11_13.2 (constants.%T)] @@ -127,7 +123,7 @@ fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDOUT: %n.param: @F.%T (%T) = value_param runtime_param1 // CHECK:STDOUT: %n: @F.%T (%T) = bind_name n, %n.param // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type.loc14_1.1: = complete_type_witness %struct_type.a [symbolic = %complete_type.loc14_1.2 (constants.%complete_type)] +// CHECK:STDOUT: %complete_type.loc14_1.1: = complete_type_witness %struct_type.a [symbolic = %complete_type.loc14_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -145,8 +141,8 @@ fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @.1(%N.loc32_10.1: %i32) { -// CHECK:STDOUT: %N.loc32_10.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc32_10.2 (constants.%N)] -// CHECK:STDOUT: %N.patt: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)] +// CHECK:STDOUT: %N.loc32_10.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc32_10.2 (constants.%N.2)] +// CHECK:STDOUT: %N.patt: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -176,8 +172,8 @@ fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDOUT: %T.patt.loc11_13.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @.1(constants.%N) { -// CHECK:STDOUT: %N.loc32_10.2 => constants.%N -// CHECK:STDOUT: %N.patt => constants.%N +// CHECK:STDOUT: specific @.1(constants.%N.2) { +// CHECK:STDOUT: %N.loc32_10.2 => constants.%N.2 +// CHECK:STDOUT: %N.patt => constants.%N.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_incomplete.carbon b/toolchain/check/testdata/class/fail_incomplete.carbon index b21382bba518..982296f8646a 100644 --- a/toolchain/check/testdata/class/fail_incomplete.carbon +++ b/toolchain/check/testdata/class/fail_incomplete.carbon @@ -187,9 +187,7 @@ class C { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %ptr.1: type = ptr_type %Class [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %MemberAccess.type: type = fn_type @MemberAccess [template] @@ -209,14 +207,14 @@ class C { // CHECK:STDOUT: %IncompleteAddrSelf: type = class_type @IncompleteAddrSelf [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %CallIncompleteAddrSelf.type: type = fn_type @CallIncompleteAddrSelf [template] // CHECK:STDOUT: %CallIncompleteAddrSelf: %CallIncompleteAddrSelf.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -264,9 +262,7 @@ class C { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] // 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: %.loc44_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc44_20.2: type = converted %int.make_type_signed, %.loc44_20.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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 %i32 = out_param runtime_param1 @@ -281,9 +277,7 @@ class C { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] // 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: %.loc55_31.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc55_31.2: type = converted %int.make_type_signed, %.loc55_31.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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 %i32 = out_param runtime_param1 @@ -363,7 +357,7 @@ class C { // CHECK:STDOUT: %self.param: %ptr.1 = value_param runtime_param0 // CHECK:STDOUT: %self: %ptr.1 = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%IncompleteAddrSelf diff --git a/toolchain/check/testdata/class/fail_init.carbon b/toolchain/check/testdata/class/fail_init.carbon index 461a2839c873..f713a96dec8f 100644 --- a/toolchain/check/testdata/class/fail_init.carbon +++ b/toolchain/check/testdata/class/fail_init.carbon @@ -35,12 +35,10 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %i32 [template] // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.a.b [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.a.b [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] @@ -48,10 +46,10 @@ fn F() { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %struct_type.a.c: type = struct_type {.a: Core.IntLiteral, .c: 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template] @@ -61,7 +59,7 @@ fn F() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -80,21 +78,17 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: class @Class { // 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: %.loc12_8: %Class.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12: %Class.elem = field_decl a, element0 [template] // 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_10.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_signed.loc13, %.loc13_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8: %Class.elem = field_decl b, element1 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13: %Class.elem = field_decl b, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class -// CHECK:STDOUT: .a = %.loc12_8 -// CHECK:STDOUT: .b = %.loc13_8 +// CHECK:STDOUT: .a = %.loc12 +// CHECK:STDOUT: .b = %.loc13 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -110,7 +104,7 @@ fn F() { // CHECK:STDOUT: %int_2.loc26: Core.IntLiteral = int_value 2 [template = constants.%int_2] // CHECK:STDOUT: %.loc26_18.1: %struct_type.a.c = struct_literal (%int_1.loc26, %int_2.loc26) // CHECK:STDOUT: %Class.ref.loc26: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.loc26, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_1.loc26) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/class/fail_init_as_inplace.carbon b/toolchain/check/testdata/class/fail_init_as_inplace.carbon index 85d03a93dba8..b25bb19094bf 100644 --- a/toolchain/check/testdata/class/fail_init_as_inplace.carbon +++ b/toolchain/check/testdata/class/fail_init_as_inplace.carbon @@ -31,13 +31,11 @@ fn F() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %i32 [template] // CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.a.b.1 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.a.b.1 [template] // CHECK:STDOUT: %ptr.1: type = ptr_type %Class [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] @@ -47,13 +45,13 @@ fn F() { // 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %Class.val: %Class = struct_value (%int_1.2, %int_2.2) [template] @@ -62,7 +60,7 @@ fn F() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -91,21 +89,17 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: class @Class { // 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: %.loc12_8: %Class.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12: %Class.elem = field_decl a, element0 [template] // 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_10.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_signed.loc13, %.loc13_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8: %Class.elem = field_decl b, element1 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13: %Class.elem = field_decl b, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class -// CHECK:STDOUT: .a = %.loc12_8 -// CHECK:STDOUT: .b = %.loc13_8 +// CHECK:STDOUT: .a = %.loc12 +// CHECK:STDOUT: .b = %.loc13 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -120,7 +114,7 @@ fn F() { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc25_33.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) // CHECK:STDOUT: %Class.ref.loc25_38: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %impl.elem0.loc25_33.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc25_33.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc25_33.1: = bound_method %int_1, %impl.elem0.loc25_33.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc25_33.1: = specific_function %Convert.bound.loc25_33.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc25_33.1: init %i32 = call %Convert.specific_fn.loc25_33.1(%int_1) [template = constants.%int_1.2] @@ -128,7 +122,7 @@ fn F() { // CHECK:STDOUT: %.loc25_33.3: ref %Class = temporary_storage // CHECK:STDOUT: %.loc25_33.4: ref %i32 = class_element_access %.loc25_33.3, element0 // CHECK:STDOUT: %.loc25_33.5: init %i32 = initialize_from %.loc25_33.2 to %.loc25_33.4 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc25_33.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc25_33.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc25_33.2: = bound_method %int_2, %impl.elem0.loc25_33.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc25_33.2: = specific_function %Convert.bound.loc25_33.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc25_33.2: init %i32 = call %Convert.specific_fn.loc25_33.2(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/class/fail_member_of_let.carbon b/toolchain/check/testdata/class/fail_member_of_let.carbon index fef660637c49..ef0e209f2ff3 100644 --- a/toolchain/check/testdata/class/fail_member_of_let.carbon +++ b/toolchain/check/testdata/class/fail_member_of_let.carbon @@ -30,20 +30,18 @@ fn T.F() {} // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] // CHECK:STDOUT: %.1: %.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -66,13 +64,11 @@ fn T.F() {} // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc12_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_signed, %.loc12_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [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: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class diff --git a/toolchain/check/testdata/class/fail_scope.carbon b/toolchain/check/testdata/class/fail_scope.carbon index dae0ca2e4bd4..634f57c17370 100644 --- a/toolchain/check/testdata/class/fail_scope.carbon +++ b/toolchain/check/testdata/class/fail_scope.carbon @@ -26,19 +26,17 @@ fn G() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] @@ -48,7 +46,7 @@ fn G() -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -67,9 +65,7 @@ fn G() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc17_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc17_11.2: type = converted %int.make_type_signed, %.loc17_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -81,13 +77,11 @@ fn G() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc12_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_signed, %.loc12_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [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: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -98,7 +92,7 @@ fn G() -> i32 { // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/class/fail_unbound_field.carbon b/toolchain/check/testdata/class/fail_unbound_field.carbon index 2422a432b771..3c28b48a51fb 100644 --- a/toolchain/check/testdata/class/fail_unbound_field.carbon +++ b/toolchain/check/testdata/class/fail_unbound_field.carbon @@ -31,21 +31,19 @@ fn G() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %i32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %struct_type.field: type = struct_type {.field: %i32} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.field [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.field [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -64,9 +62,7 @@ fn G() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc22_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc22_11.2: type = converted %int.make_type_signed, %.loc22_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -74,40 +70,36 @@ fn G() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: class @Class { // 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: %.loc12_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_14.2: type = converted %int.make_type_signed, %.loc12_14.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_12: %Class.elem = field_decl field, element0 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12: %Class.elem = field_decl field, element0 [template] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // 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: %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_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_13.2: type = converted %int.make_type_signed, %.loc13_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [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: %complete_type: = complete_type_witness %struct_type.field [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.field [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class -// CHECK:STDOUT: .field = %.loc12_12 +// CHECK:STDOUT: .field = %.loc12 // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %field.ref: %Class.elem = name_ref field, @Class.%.loc12_12 [template = @Class.%.loc12_12] +// CHECK:STDOUT: %field.ref: %Class.elem = name_ref field, @Class.%.loc12 [template = @Class.%.loc12] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %field.ref: %Class.elem = name_ref field, @Class.%.loc12_12 [template = @Class.%.loc12_12] +// CHECK:STDOUT: %field.ref: %Class.elem = name_ref field, @Class.%.loc12 [template = @Class.%.loc12] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_unknown_member.carbon b/toolchain/check/testdata/class/fail_unknown_member.carbon index af1131b3d35b..f381b0f3297d 100644 --- a/toolchain/check/testdata/class/fail_unknown_member.carbon +++ b/toolchain/check/testdata/class/fail_unknown_member.carbon @@ -25,19 +25,17 @@ fn G(c: Class) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %i32 [template] // CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.n [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -59,9 +57,7 @@ fn G(c: Class) -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // 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: %.loc15_19.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_19.2: type = converted %int.make_type_signed, %.loc15_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %c.param: %Class = value_param runtime_param0 // CHECK:STDOUT: %c: %Class = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -71,15 +67,13 @@ fn G(c: Class) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: class @Class { // 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: %.loc12_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed, %.loc12_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8: %Class.elem = field_decl n, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12: %Class.elem = field_decl n, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class -// CHECK:STDOUT: .n = %.loc12_8 +// CHECK:STDOUT: .n = %.loc12 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/field_access.carbon b/toolchain/check/testdata/class/field_access.carbon index 9d43cd28cd1a..e237f048eebc 100644 --- a/toolchain/check/testdata/class/field_access.carbon +++ b/toolchain/check/testdata/class/field_access.carbon @@ -26,24 +26,22 @@ fn Run() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %i32 [template] // CHECK:STDOUT: %struct_type.j.k: type = struct_type {.j: %i32, .k: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.j.k [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.j.k [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } @@ -51,7 +49,7 @@ fn Run() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -70,21 +68,17 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: class @Class { // 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: %.loc12_8: %Class.elem = field_decl j, element0 [template] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12: %Class.elem = field_decl j, element0 [template] // 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_10.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_signed.loc13, %.loc13_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8: %Class.elem = field_decl k, element1 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.j.k [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13: %Class.elem = field_decl k, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.j.k [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class -// CHECK:STDOUT: .j = %.loc12_8 -// CHECK:STDOUT: .k = %.loc13_8 +// CHECK:STDOUT: .j = %.loc12 +// CHECK:STDOUT: .k = %.loc13 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -94,44 +88,40 @@ fn Run() { // CHECK:STDOUT: %c.var: ref %Class = var c // CHECK:STDOUT: %c: ref %Class = bind_name c, %c.var // CHECK:STDOUT: %c.ref.loc18: ref %Class = name_ref c, %c -// CHECK:STDOUT: %j.ref.loc18: %Class.elem = name_ref j, @Class.%.loc12_8 [template = @Class.%.loc12_8] +// CHECK:STDOUT: %j.ref.loc18: %Class.elem = name_ref j, @Class.%.loc12 [template = @Class.%.loc12] // CHECK:STDOUT: %.loc18_4: ref %i32 = class_element_access %c.ref.loc18, element0 // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc18: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc18: = bound_method %int_1, %impl.elem0.loc18 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc18: = specific_function %Convert.bound.loc18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %Convert.specific_fn.loc18(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc18_7: init %i32 = converted %int_1, %int.convert_checked.loc18 [template = constants.%int_1.2] // CHECK:STDOUT: assign %.loc18_4, %.loc18_7 // CHECK:STDOUT: %c.ref.loc19: ref %Class = name_ref c, %c -// CHECK:STDOUT: %k.ref.loc19: %Class.elem = name_ref k, @Class.%.loc13_8 [template = @Class.%.loc13_8] +// CHECK:STDOUT: %k.ref.loc19: %Class.elem = name_ref k, @Class.%.loc13 [template = @Class.%.loc13] // CHECK:STDOUT: %.loc19_4: ref %i32 = class_element_access %c.ref.loc19, element1 // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc19: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc19: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc19: = bound_method %int_2, %impl.elem0.loc19 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc19: = specific_function %Convert.bound.loc19, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %Convert.specific_fn.loc19(%int_2) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc19_7: init %i32 = converted %int_2, %int.convert_checked.loc19 [template = constants.%int_2.2] // CHECK:STDOUT: assign %.loc19_4, %.loc19_7 // 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_11.1: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32] -// CHECK:STDOUT: %.loc20_11.2: type = converted %int.make_type_signed.loc20, %.loc20_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %cj.var: ref %i32 = var cj // CHECK:STDOUT: %cj: ref %i32 = bind_name cj, %cj.var // CHECK:STDOUT: %c.ref.loc20: ref %Class = name_ref c, %c -// CHECK:STDOUT: %j.ref.loc20: %Class.elem = name_ref j, @Class.%.loc12_8 [template = @Class.%.loc12_8] +// CHECK:STDOUT: %j.ref.loc20: %Class.elem = name_ref j, @Class.%.loc12 [template = @Class.%.loc12] // CHECK:STDOUT: %.loc20_18.1: ref %i32 = class_element_access %c.ref.loc20, element0 // CHECK:STDOUT: %.loc20_18.2: %i32 = bind_value %.loc20_18.1 // CHECK:STDOUT: assign %cj.var, %.loc20_18.2 // CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_11.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_11.2: type = converted %int.make_type_signed.loc21, %.loc21_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ck.var: ref %i32 = var ck // CHECK:STDOUT: %ck: ref %i32 = bind_name ck, %ck.var // CHECK:STDOUT: %c.ref.loc21: ref %Class = name_ref c, %c -// CHECK:STDOUT: %k.ref.loc21: %Class.elem = name_ref k, @Class.%.loc13_8 [template = @Class.%.loc13_8] +// CHECK:STDOUT: %k.ref.loc21: %Class.elem = name_ref k, @Class.%.loc13 [template = @Class.%.loc13] // CHECK:STDOUT: %.loc21_18.1: ref %i32 = class_element_access %c.ref.loc21, element1 // CHECK:STDOUT: %.loc21_18.2: %i32 = bind_value %.loc21_18.1 // CHECK:STDOUT: assign %ck.var, %.loc21_18.2 diff --git a/toolchain/check/testdata/class/field_access_in_value.carbon b/toolchain/check/testdata/class/field_access_in_value.carbon index 9361826dc84b..748ddba84a38 100644 --- a/toolchain/check/testdata/class/field_access_in_value.carbon +++ b/toolchain/check/testdata/class/field_access_in_value.carbon @@ -27,24 +27,22 @@ fn Test() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %i32 [template] // CHECK:STDOUT: %struct_type.j.k: type = struct_type {.j: %i32, .k: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.j.k [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.j.k [template] // CHECK:STDOUT: %Test.type: type = fn_type @Test [template] // CHECK:STDOUT: %Test: %Test.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } @@ -52,7 +50,7 @@ fn Test() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -71,21 +69,17 @@ fn Test() { // CHECK:STDOUT: // CHECK:STDOUT: class @Class { // 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: %.loc12_8: %Class.elem = field_decl j, element0 [template] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12: %Class.elem = field_decl j, element0 [template] // 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_10.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_signed.loc13, %.loc13_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8: %Class.elem = field_decl k, element1 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.j.k [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13: %Class.elem = field_decl k, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.j.k [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class -// CHECK:STDOUT: .j = %.loc12_8 -// CHECK:STDOUT: .k = %.loc13_8 +// CHECK:STDOUT: .j = %.loc12 +// CHECK:STDOUT: .k = %.loc13 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -95,20 +89,20 @@ fn Test() { // CHECK:STDOUT: %cv.var: ref %Class = var cv // CHECK:STDOUT: %cv: ref %Class = bind_name cv, %cv.var // CHECK:STDOUT: %cv.ref.loc18: ref %Class = name_ref cv, %cv -// CHECK:STDOUT: %j.ref.loc18: %Class.elem = name_ref j, @Class.%.loc12_8 [template = @Class.%.loc12_8] +// CHECK:STDOUT: %j.ref.loc18: %Class.elem = name_ref j, @Class.%.loc12 [template = @Class.%.loc12] // CHECK:STDOUT: %.loc18_5: ref %i32 = class_element_access %cv.ref.loc18, element0 // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc18: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc18: = bound_method %int_1, %impl.elem0.loc18 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc18: = specific_function %Convert.bound.loc18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %Convert.specific_fn.loc18(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc18_8: init %i32 = converted %int_1, %int.convert_checked.loc18 [template = constants.%int_1.2] // CHECK:STDOUT: assign %.loc18_5, %.loc18_8 // CHECK:STDOUT: %cv.ref.loc19: ref %Class = name_ref cv, %cv -// CHECK:STDOUT: %k.ref.loc19: %Class.elem = name_ref k, @Class.%.loc13_8 [template = @Class.%.loc13_8] +// CHECK:STDOUT: %k.ref.loc19: %Class.elem = name_ref k, @Class.%.loc13 [template = @Class.%.loc13] // CHECK:STDOUT: %.loc19_5: ref %i32 = class_element_access %cv.ref.loc19, element1 // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc19: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc19: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc19: = bound_method %int_2, %impl.elem0.loc19 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc19: = specific_function %Convert.bound.loc19, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %Convert.specific_fn.loc19(%int_2) [template = constants.%int_2.2] @@ -119,24 +113,20 @@ fn Test() { // CHECK:STDOUT: %.loc20: %Class = bind_value %cv.ref.loc20 // CHECK:STDOUT: %c: %Class = bind_name c, %.loc20 // CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_11.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_11.2: type = converted %int.make_type_signed.loc21, %.loc21_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %cj.var: ref %i32 = var cj // CHECK:STDOUT: %cj: ref %i32 = bind_name cj, %cj.var // CHECK:STDOUT: %c.ref.loc21: %Class = name_ref c, %c -// CHECK:STDOUT: %j.ref.loc21: %Class.elem = name_ref j, @Class.%.loc12_8 [template = @Class.%.loc12_8] +// CHECK:STDOUT: %j.ref.loc21: %Class.elem = name_ref j, @Class.%.loc12 [template = @Class.%.loc12] // CHECK:STDOUT: %.loc21_18.1: ref %i32 = class_element_access %c.ref.loc21, element0 // CHECK:STDOUT: %.loc21_18.2: %i32 = bind_value %.loc21_18.1 // CHECK:STDOUT: assign %cj.var, %.loc21_18.2 // 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_11.1: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] -// CHECK:STDOUT: %.loc22_11.2: type = converted %int.make_type_signed.loc22, %.loc22_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ck.var: ref %i32 = var ck // CHECK:STDOUT: %ck: ref %i32 = bind_name ck, %ck.var // CHECK:STDOUT: %c.ref.loc22: %Class = name_ref c, %c -// CHECK:STDOUT: %k.ref.loc22: %Class.elem = name_ref k, @Class.%.loc13_8 [template = @Class.%.loc13_8] +// CHECK:STDOUT: %k.ref.loc22: %Class.elem = name_ref k, @Class.%.loc13 [template = @Class.%.loc13] // CHECK:STDOUT: %.loc22_18.1: ref %i32 = class_element_access %c.ref.loc22, element1 // CHECK:STDOUT: %.loc22_18.2: %i32 = bind_value %.loc22_18.1 // CHECK:STDOUT: assign %ck.var, %.loc22_18.2 diff --git a/toolchain/check/testdata/class/generic/adapt.carbon b/toolchain/check/testdata/class/generic/adapt.carbon index 031f2b22e1f7..ea7715560369 100644 --- a/toolchain/check/testdata/class/generic/adapt.carbon +++ b/toolchain/check/testdata/class/generic/adapt.carbon @@ -128,27 +128,26 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] // CHECK:STDOUT: %C.1: type = class_type @C, @C(%T) [symbolic] -// CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic] +// CHECK:STDOUT: %require_complete.1: = require_complete_type %T [symbolic] // CHECK:STDOUT: %C.elem.1: type = unbound_element_type %C.1, %T [symbolic] // CHECK:STDOUT: %struct_type.x.1: type = struct_type {.x: %T} [symbolic] // CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x.1 [symbolic] // CHECK:STDOUT: %Adapter: type = class_type @Adapter [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%i32) [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32 [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %i32.builtin [template] // CHECK:STDOUT: %C.elem.2: type = unbound_element_type %C.2, %i32 [template] // CHECK:STDOUT: %struct_type.x.2: type = struct_type {.x: %i32} [template] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.x.2 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.x.2 [template] // CHECK:STDOUT: %Access.type: type = fn_type @Access [template] // CHECK:STDOUT: %Access: %Access.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -178,289 +177,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %Adapter.ref: type = name_ref Adapter, file.%Adapter.decl [template = constants.%Adapter] // 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_26.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_26.2: type = converted %int.make_type_signed.loc12, %.loc12_26.1 [template = constants.%i32] -// CHECK:STDOUT: %a.param: %Adapter = value_param runtime_param0 -// CHECK:STDOUT: %a: %Adapter = bind_name a, %a.param -// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(%T.loc4_9.1: type) { -// CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_9.2 (constants.%T)] -// CHECK:STDOUT: %T.patt.loc4_9.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)] -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type @C.%T.loc4_9.2 (%T) [symbolic = %require_complete (constants.%require_complete)] -// CHECK:STDOUT: %C: type = class_type @C, @C(%T.loc4_9.2) [symbolic = %C (constants.%C.1)] -// CHECK:STDOUT: %C.elem: type = unbound_element_type @C.%C (%C.1), @C.%T.loc4_9.2 (%T) [symbolic = %C.elem (constants.%C.elem.1)] -// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: @C.%T.loc4_9.2 (%T)} [symbolic = %struct_type.x (constants.%struct_type.x.1)] -// CHECK:STDOUT: %complete_type.loc6_1.2: = complete_type_witness @C.%struct_type.x (%struct_type.x.1) [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] -// CHECK:STDOUT: -// CHECK:STDOUT: class { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_9.1 [symbolic = %T.loc4_9.2 (constants.%T)] -// CHECK:STDOUT: %.loc5: @C.%C.elem (%C.elem.1) = field_decl x, element0 [template] -// CHECK:STDOUT: %complete_type.loc6_1.1: = complete_type_witness %struct_type.x.1 [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%C.1 -// CHECK:STDOUT: .x = %.loc5 -// CHECK:STDOUT: complete_type_witness = %complete_type.loc6_1.1 -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: class @Adapter { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] -// 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: %.loc9_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc9_14.2: type = converted %int.make_type_signed, %.loc9_14.1 [template = constants.%i32] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.2] -// CHECK:STDOUT: adapt_decl %C [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.2 [template = constants.%complete_type.3] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%Adapter -// CHECK:STDOUT: complete_type_witness = %complete_type -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Access(%a.param_patt: %Adapter) -> %i32 { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %Adapter = name_ref a, %a -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] -// 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_21.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_21.2: type = converted %int.make_type_signed.loc13, %.loc13_21.1 [template = constants.%i32] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.2] -// CHECK:STDOUT: %.loc13_13.1: %C.2 = as_compatible %a.ref -// CHECK:STDOUT: %.loc13_13.2: %C.2 = converted %a.ref, %.loc13_13.1 -// CHECK:STDOUT: %x.ref: %C.elem.2 = name_ref x, @C.%.loc5 [template = @C.%.loc5] -// CHECK:STDOUT: %.loc13_23.1: ref %i32 = class_element_access %.loc13_13.2, element0 -// CHECK:STDOUT: %.loc13_23.2: %i32 = bind_value %.loc13_23.1 -// CHECK:STDOUT: return %.loc13_23.2 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%T) { -// CHECK:STDOUT: %T.loc4_9.2 => constants.%T -// CHECK:STDOUT: %T.patt.loc4_9.2 => constants.%T -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @C(%T.loc4_9.2) { -// CHECK:STDOUT: %T.loc4_9.2 => constants.%T -// CHECK:STDOUT: %T.patt.loc4_9.2 => constants.%T -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%i32) { -// CHECK:STDOUT: %T.loc4_9.2 => constants.%i32 -// CHECK:STDOUT: %T.patt.loc4_9.2 => constants.%i32 -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%complete_type.2 -// CHECK:STDOUT: %C => constants.%C.2 -// CHECK:STDOUT: %C.elem => constants.%C.elem.2 -// CHECK:STDOUT: %struct_type.x => constants.%struct_type.x.2 -// CHECK:STDOUT: %complete_type.loc6_1.2 => constants.%complete_type.3 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: --- import_adapt_specific_type.carbon -// CHECK:STDOUT: -// CHECK:STDOUT: constants { -// CHECK:STDOUT: %Adapter: type = class_type @Adapter [template] -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] -// CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %struct_type.x.1: type = struct_type {.x: %T} [symbolic] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x.1 [symbolic] -// CHECK:STDOUT: %C.1: type = class_type @C, @C(%T) [symbolic] -// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %C.2: type = class_type @C, @C(%i32) [template] -// CHECK:STDOUT: %struct_type.x.2: type = struct_type {.x: %i32} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.x.2 [template] -// CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %C.elem.1: type = unbound_element_type %C.1, %T [symbolic] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %i32 [template] -// CHECK:STDOUT: %C.elem.2: type = unbound_element_type %C.2, %i32 [template] -// CHECK:STDOUT: %Int.type: type = fn_type @Int [template] -// CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %ImportedAccess.type: type = fn_type @ImportedAccess [template] -// CHECK:STDOUT: %ImportedAccess: %ImportedAccess.type = struct_value () [template] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: %C.type = import_ref Main//adapt_specific_type, C, loaded [template = constants.%C.generic] -// CHECK:STDOUT: %import_ref.2: type = import_ref Main//adapt_specific_type, Adapter, loaded [template = constants.%Adapter] -// CHECK:STDOUT: %import_ref.3 = import_ref Main//adapt_specific_type, Access, unloaded -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref.10 -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref Main//adapt_specific_type, loc6_1, loaded [symbolic = @C.%complete_type (constants.%complete_type.1)] -// CHECK:STDOUT: %import_ref.5 = import_ref Main//adapt_specific_type, inst27 [no loc], unloaded -// CHECK:STDOUT: %import_ref.6: @C.%C.elem (%C.elem.1) = import_ref Main//adapt_specific_type, loc5_8, loaded [template = %.1] -// CHECK:STDOUT: %import_ref.8: = import_ref Main//adapt_specific_type, loc10_1, loaded [template = constants.%complete_type.2] -// CHECK:STDOUT: %import_ref.9 = import_ref Main//adapt_specific_type, inst42 [no loc], unloaded -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [template] { -// CHECK:STDOUT: .C = imports.%import_ref.1 -// CHECK:STDOUT: .Adapter = imports.%import_ref.2 -// CHECK:STDOUT: .Access = imports.%import_ref.3 -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .ImportedAccess = %ImportedAccess.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %ImportedAccess.decl: %ImportedAccess.type = fn_decl @ImportedAccess [template = constants.%ImportedAccess] { -// CHECK:STDOUT: %a.patt: %Adapter = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %Adapter = value_param_pattern %a.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 -// CHECK:STDOUT: } { -// CHECK:STDOUT: %Adapter.ref: type = name_ref Adapter, imports.%import_ref.2 [template = constants.%Adapter] -// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_34.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_34.2: type = converted %int.make_type_signed.loc6, %.loc6_34.1 [template = constants.%i32] -// CHECK:STDOUT: %a.param: %Adapter = value_param runtime_param0 -// CHECK:STDOUT: %a: %Adapter = bind_name a, %a.param -// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: class @Adapter [from "adapt_specific_type.carbon"] { -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.9 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.8 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(constants.%T: type) [from "adapt_specific_type.carbon"] { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type @C.%T (%T) [symbolic = %require_complete (constants.%require_complete)] -// CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C.1)] -// CHECK:STDOUT: %C.elem: type = unbound_element_type @C.%C (%C.1), @C.%T (%T) [symbolic = %C.elem (constants.%C.elem.1)] -// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: @C.%T (%T)} [symbolic = %struct_type.x (constants.%struct_type.x.1)] -// CHECK:STDOUT: %complete_type: = complete_type_witness @C.%struct_type.x (%struct_type.x.1) [symbolic = %complete_type (constants.%complete_type.1)] -// CHECK:STDOUT: -// CHECK:STDOUT: class { -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.5 -// CHECK:STDOUT: .x = imports.%import_ref.6 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.4 -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @ImportedAccess(%a.param_patt: %Adapter) -> %i32 { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %Adapter = name_ref a, %a -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.1 [template = constants.%C.generic] -// CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_21.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_21.2: type = converted %int.make_type_signed.loc7, %.loc7_21.1 [template = constants.%i32] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.2] -// CHECK:STDOUT: %.loc7_13.1: %C.2 = as_compatible %a.ref -// CHECK:STDOUT: %.loc7_13.2: %C.2 = converted %a.ref, %.loc7_13.1 -// CHECK:STDOUT: %x.ref: %C.elem.2 = name_ref x, imports.%import_ref.6 [template = imports.%.1] -// CHECK:STDOUT: %.loc7_23.1: ref %i32 = class_element_access %.loc7_13.2, element0 -// CHECK:STDOUT: %.loc7_23.2: %i32 = bind_value %.loc7_23.1 -// CHECK:STDOUT: return %.loc7_23.2 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%T) { -// CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %T.patt => constants.%T -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%i32) { -// CHECK:STDOUT: %T => constants.%i32 -// CHECK:STDOUT: %T.patt => constants.%i32 -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%complete_type.3 -// CHECK:STDOUT: %C => constants.%C.2 -// CHECK:STDOUT: %C.elem => constants.%C.elem.2 -// CHECK:STDOUT: %struct_type.x => constants.%struct_type.x.2 -// CHECK:STDOUT: %complete_type => constants.%complete_type.2 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @C(%T) { -// CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %T.patt => constants.%T -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: --- fail_todo_extend_adapt_specific_type.carbon -// CHECK:STDOUT: -// CHECK:STDOUT: constants { -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] -// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %C.type: type = generic_class_type @C [template] -// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] -// CHECK:STDOUT: %C.1: type = class_type @C, @C(%T) [symbolic] -// CHECK:STDOUT: %require_complete.1: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %C.elem.1: type = unbound_element_type %C.1, %T [symbolic] -// CHECK:STDOUT: %struct_type.x.1: type = struct_type {.x: %T} [symbolic] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x.1 [symbolic] -// CHECK:STDOUT: %Adapter: type = class_type @Adapter [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, %int_32 [template] -// CHECK:STDOUT: %C.2: type = class_type @C, @C(%i32) [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32 [template] -// CHECK:STDOUT: %C.elem.2: type = unbound_element_type %C.2, %i32 [template] -// CHECK:STDOUT: %struct_type.x.2: type = struct_type {.x: %i32} [template] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.x.2 [template] -// CHECK:STDOUT: %Access.type: type = fn_type @Access [template] -// CHECK:STDOUT: %Access: %Access.type = struct_value () [template] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 -// CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//prelude/... -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [template] { -// CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .C = %C.decl -// CHECK:STDOUT: .Adapter = %Adapter.decl -// CHECK:STDOUT: .Access = %Access.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] { -// CHECK:STDOUT: %T.patt.loc4_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_9.1, runtime_param [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %T.param: type = value_param runtime_param -// CHECK:STDOUT: %T.loc4_9.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_9.2 (constants.%T)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %Adapter.decl: type = class_decl @Adapter [template = constants.%Adapter] {} {} -// CHECK:STDOUT: %Access.decl: %Access.type = fn_decl @Access [template = constants.%Access] { -// CHECK:STDOUT: %a.patt: %Adapter = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %Adapter = value_param_pattern %a.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 -// CHECK:STDOUT: } { -// CHECK:STDOUT: %Adapter.ref: type = name_ref Adapter, file.%Adapter.decl [template = constants.%Adapter] -// 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: %.loc12_26.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_26.2: type = converted %int.make_type_signed, %.loc12_26.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %Adapter = value_param runtime_param0 // CHECK:STDOUT: %a: %Adapter = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -494,12 +211,278 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: class @Adapter { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] // 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: %.loc9_21.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc9_21.2: type = converted %int.make_type_signed, %.loc9_21.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.2] // CHECK:STDOUT: adapt_decl %C [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.2 [template = constants.%complete_type.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.2 [template = constants.%complete_type.4] +// CHECK:STDOUT: +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Self = constants.%Adapter +// CHECK:STDOUT: complete_type_witness = %complete_type +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: fn @Access(%a.param_patt: %Adapter) -> %i32 { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: %a.ref: %Adapter = name_ref a, %a +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] +// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.2] +// CHECK:STDOUT: %.loc13_13.1: %C.2 = as_compatible %a.ref +// CHECK:STDOUT: %.loc13_13.2: %C.2 = converted %a.ref, %.loc13_13.1 +// CHECK:STDOUT: %x.ref: %C.elem.2 = name_ref x, @C.%.loc5 [template = @C.%.loc5] +// CHECK:STDOUT: %.loc13_23.1: ref %i32 = class_element_access %.loc13_13.2, element0 +// CHECK:STDOUT: %.loc13_23.2: %i32 = bind_value %.loc13_23.1 +// CHECK:STDOUT: return %.loc13_23.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @C(constants.%T) { +// CHECK:STDOUT: %T.loc4_9.2 => constants.%T +// CHECK:STDOUT: %T.patt.loc4_9.2 => constants.%T +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @C(%T.loc4_9.2) { +// CHECK:STDOUT: %T.loc4_9.2 => constants.%T +// CHECK:STDOUT: %T.patt.loc4_9.2 => constants.%T +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @C(constants.%i32) { +// CHECK:STDOUT: %T.loc4_9.2 => constants.%i32 +// CHECK:STDOUT: %T.patt.loc4_9.2 => constants.%i32 +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %require_complete => constants.%complete_type.3 +// CHECK:STDOUT: %C => constants.%C.2 +// CHECK:STDOUT: %C.elem => constants.%C.elem.2 +// CHECK:STDOUT: %struct_type.x => constants.%struct_type.x.2 +// CHECK:STDOUT: %complete_type.loc6_1.2 => constants.%complete_type.4 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: --- import_adapt_specific_type.carbon +// CHECK:STDOUT: +// CHECK:STDOUT: constants { +// CHECK:STDOUT: %Adapter: type = class_type @Adapter [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %C.type: type = generic_class_type @C [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %struct_type.x.1: type = struct_type {.x: %T} [symbolic] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.x.1 [symbolic] +// CHECK:STDOUT: %C.1: type = class_type @C, @C(%T) [symbolic] +// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%i32) [template] +// CHECK:STDOUT: %struct_type.x.2: type = struct_type {.x: %i32} [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.x.2 [template] +// CHECK:STDOUT: %require_complete.2: = require_complete_type %T [symbolic] +// CHECK:STDOUT: %C.elem.1: type = unbound_element_type %C.1, %T [symbolic] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %i32.builtin [template] +// CHECK:STDOUT: %C.elem.2: type = unbound_element_type %C.2, %i32 [template] +// CHECK:STDOUT: %ImportedAccess.type: type = fn_type @ImportedAccess [template] +// CHECK:STDOUT: %ImportedAccess: %ImportedAccess.type = struct_value () [template] +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %import_ref.1: %C.type = import_ref Main//adapt_specific_type, C, loaded [template = constants.%C.generic] +// CHECK:STDOUT: %import_ref.2: type = import_ref Main//adapt_specific_type, Adapter, loaded [template = constants.%Adapter] +// CHECK:STDOUT: %import_ref.3 = import_ref Main//adapt_specific_type, Access, unloaded +// CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { +// CHECK:STDOUT: .Int = %import_ref.13 +// CHECK:STDOUT: import Core//prelude +// CHECK:STDOUT: import Core//prelude/... +// CHECK:STDOUT: } +// CHECK:STDOUT: %import_ref.7: = import_ref Main//adapt_specific_type, loc6_1, loaded [symbolic = @C.%complete_type (constants.%complete_type.2)] +// CHECK:STDOUT: %import_ref.8 = import_ref Main//adapt_specific_type, inst27 [no loc], unloaded +// CHECK:STDOUT: %import_ref.9: @C.%C.elem (%C.elem.1) = import_ref Main//adapt_specific_type, loc5_8, loaded [template = %.1] +// CHECK:STDOUT: %import_ref.11: = import_ref Main//adapt_specific_type, loc10_1, loaded [template = constants.%complete_type.3] +// CHECK:STDOUT: %import_ref.12 = import_ref Main//adapt_specific_type, inst42 [no loc], unloaded +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: file { +// CHECK:STDOUT: package: = namespace [template] { +// CHECK:STDOUT: .C = imports.%import_ref.1 +// CHECK:STDOUT: .Adapter = imports.%import_ref.2 +// CHECK:STDOUT: .Access = imports.%import_ref.3 +// CHECK:STDOUT: .Core = imports.%Core +// CHECK:STDOUT: .ImportedAccess = %ImportedAccess.decl +// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import = import Core +// CHECK:STDOUT: %default.import = import +// CHECK:STDOUT: %ImportedAccess.decl: %ImportedAccess.type = fn_decl @ImportedAccess [template = constants.%ImportedAccess] { +// CHECK:STDOUT: %a.patt: %Adapter = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %Adapter = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: } { +// CHECK:STDOUT: %Adapter.ref: type = name_ref Adapter, imports.%import_ref.2 [template = constants.%Adapter] +// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %a.param: %Adapter = value_param runtime_param0 +// CHECK:STDOUT: %a: %Adapter = bind_name a, %a.param +// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: class @Adapter [from "adapt_specific_type.carbon"] { +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Self = imports.%import_ref.12 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.11 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic class @C(constants.%T: type) [from "adapt_specific_type.carbon"] { +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %require_complete: = require_complete_type @C.%T (%T) [symbolic = %require_complete (constants.%require_complete.2)] +// CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C.1)] +// CHECK:STDOUT: %C.elem: type = unbound_element_type @C.%C (%C.1), @C.%T (%T) [symbolic = %C.elem (constants.%C.elem.1)] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: @C.%T (%T)} [symbolic = %struct_type.x (constants.%struct_type.x.1)] +// CHECK:STDOUT: %complete_type: = complete_type_witness @C.%struct_type.x (%struct_type.x.1) [symbolic = %complete_type (constants.%complete_type.2)] +// CHECK:STDOUT: +// CHECK:STDOUT: class { +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Self = imports.%import_ref.8 +// CHECK:STDOUT: .x = imports.%import_ref.9 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.7 +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: fn @ImportedAccess(%a.param_patt: %Adapter) -> %i32 { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: %a.ref: %Adapter = name_ref a, %a +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.1 [template = constants.%C.generic] +// CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.2] +// CHECK:STDOUT: %.loc7_13.1: %C.2 = as_compatible %a.ref +// CHECK:STDOUT: %.loc7_13.2: %C.2 = converted %a.ref, %.loc7_13.1 +// CHECK:STDOUT: %x.ref: %C.elem.2 = name_ref x, imports.%import_ref.9 [template = imports.%.1] +// CHECK:STDOUT: %.loc7_23.1: ref %i32 = class_element_access %.loc7_13.2, element0 +// CHECK:STDOUT: %.loc7_23.2: %i32 = bind_value %.loc7_23.1 +// CHECK:STDOUT: return %.loc7_23.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @C(constants.%T) { +// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %T.patt => constants.%T +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @C(constants.%i32) { +// CHECK:STDOUT: %T => constants.%i32 +// CHECK:STDOUT: %T.patt => constants.%i32 +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %require_complete => constants.%complete_type.4 +// CHECK:STDOUT: %C => constants.%C.2 +// CHECK:STDOUT: %C.elem => constants.%C.elem.2 +// CHECK:STDOUT: %struct_type.x => constants.%struct_type.x.2 +// CHECK:STDOUT: %complete_type => constants.%complete_type.3 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @C(%T) { +// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %T.patt => constants.%T +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: --- fail_todo_extend_adapt_specific_type.carbon +// CHECK:STDOUT: +// CHECK:STDOUT: constants { +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %C.type: type = generic_class_type @C [template] +// CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] +// CHECK:STDOUT: %C.1: type = class_type @C, @C(%T) [symbolic] +// CHECK:STDOUT: %require_complete.1: = require_complete_type %T [symbolic] +// CHECK:STDOUT: %C.elem.1: type = unbound_element_type %C.1, %T [symbolic] +// CHECK:STDOUT: %struct_type.x.1: type = struct_type {.x: %T} [symbolic] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x.1 [symbolic] +// CHECK:STDOUT: %Adapter: type = class_type @Adapter [template] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%i32) [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %i32.builtin [template] +// CHECK:STDOUT: %C.elem.2: type = unbound_element_type %C.2, %i32 [template] +// CHECK:STDOUT: %struct_type.x.2: type = struct_type {.x: %i32} [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.x.2 [template] +// CHECK:STDOUT: %Access.type: type = fn_type @Access [template] +// CHECK:STDOUT: %Access: %Access.type = struct_value () [template] +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { +// CHECK:STDOUT: .Int = %import_ref.1 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 +// CHECK:STDOUT: import Core//prelude +// CHECK:STDOUT: import Core//prelude/... +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: file { +// CHECK:STDOUT: package: = namespace [template] { +// CHECK:STDOUT: .Core = imports.%Core +// CHECK:STDOUT: .C = %C.decl +// CHECK:STDOUT: .Adapter = %Adapter.decl +// CHECK:STDOUT: .Access = %Access.decl +// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import = import Core +// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] { +// CHECK:STDOUT: %T.patt.loc4_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_9.1, runtime_param [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)] +// CHECK:STDOUT: } { +// CHECK:STDOUT: %T.param: type = value_param runtime_param +// CHECK:STDOUT: %T.loc4_9.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_9.2 (constants.%T)] +// CHECK:STDOUT: } +// CHECK:STDOUT: %Adapter.decl: type = class_decl @Adapter [template = constants.%Adapter] {} {} +// CHECK:STDOUT: %Access.decl: %Access.type = fn_decl @Access [template = constants.%Access] { +// CHECK:STDOUT: %a.patt: %Adapter = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %Adapter = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: } { +// CHECK:STDOUT: %Adapter.ref: type = name_ref Adapter, file.%Adapter.decl [template = constants.%Adapter] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %a.param: %Adapter = value_param runtime_param0 +// CHECK:STDOUT: %a: %Adapter = bind_name a, %a.param +// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic class @C(%T.loc4_9.1: type) { +// CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_9.2 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc4_9.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)] +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %require_complete: = require_complete_type @C.%T.loc4_9.2 (%T) [symbolic = %require_complete (constants.%require_complete.1)] +// CHECK:STDOUT: %C: type = class_type @C, @C(%T.loc4_9.2) [symbolic = %C (constants.%C.1)] +// CHECK:STDOUT: %C.elem: type = unbound_element_type @C.%C (%C.1), @C.%T.loc4_9.2 (%T) [symbolic = %C.elem (constants.%C.elem.1)] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: @C.%T.loc4_9.2 (%T)} [symbolic = %struct_type.x (constants.%struct_type.x.1)] +// CHECK:STDOUT: %complete_type.loc6_1.2: = complete_type_witness @C.%struct_type.x (%struct_type.x.1) [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] +// CHECK:STDOUT: +// CHECK:STDOUT: class { +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_9.1 [symbolic = %T.loc4_9.2 (constants.%T)] +// CHECK:STDOUT: %.loc5: @C.%C.elem (%C.elem.1) = field_decl x, element0 [template] +// CHECK:STDOUT: %complete_type.loc6_1.1: = complete_type_witness %struct_type.x.1 [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] +// CHECK:STDOUT: +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Self = constants.%C.1 +// CHECK:STDOUT: .x = %.loc5 +// CHECK:STDOUT: complete_type_witness = %complete_type.loc6_1.1 +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: class @Adapter { +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.2] +// CHECK:STDOUT: adapt_decl %C [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.2 [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Adapter @@ -531,11 +514,11 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T.patt.loc4_9.2 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%complete_type.2 +// CHECK:STDOUT: %require_complete => constants.%complete_type.3 // CHECK:STDOUT: %C => constants.%C.2 // CHECK:STDOUT: %C.elem => constants.%C.elem.2 // CHECK:STDOUT: %struct_type.x => constants.%struct_type.x.2 -// CHECK:STDOUT: %complete_type.loc6_1.2 => constants.%complete_type.3 +// CHECK:STDOUT: %complete_type.loc6_1.2 => constants.%complete_type.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- extend_adapt_specific_type_library.carbon @@ -546,25 +529,24 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] // CHECK:STDOUT: %C.1: type = class_type @C, @C(%T) [symbolic] -// CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic] +// CHECK:STDOUT: %require_complete.1: = require_complete_type %T [symbolic] // CHECK:STDOUT: %C.elem.1: type = unbound_element_type %C.1, %T [symbolic] // CHECK:STDOUT: %struct_type.x.1: type = struct_type {.x: %T} [symbolic] // CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x.1 [symbolic] // CHECK:STDOUT: %Adapter: type = class_type @Adapter [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%i32) [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32 [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %i32.builtin [template] // CHECK:STDOUT: %C.elem.2: type = unbound_element_type %C.2, %i32 [template] // CHECK:STDOUT: %struct_type.x.2: type = struct_type {.x: %i32} [template] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.x.2 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.x.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -592,7 +574,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T.patt.loc7_9.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_9.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type @C.%T.loc7_9.2 (%T) [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type @C.%T.loc7_9.2 (%T) [symbolic = %require_complete (constants.%require_complete.1)] // CHECK:STDOUT: %C: type = class_type @C, @C(%T.loc7_9.2) [symbolic = %C (constants.%C.1)] // CHECK:STDOUT: %C.elem: type = unbound_element_type @C.%C (%C.1), @C.%T.loc7_9.2 (%T) [symbolic = %C.elem (constants.%C.elem.1)] // CHECK:STDOUT: %struct_type.x: type = struct_type {.x: @C.%T.loc7_9.2 (%T)} [symbolic = %struct_type.x (constants.%struct_type.x.1)] @@ -613,12 +595,10 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: class @Adapter { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] // 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: %.loc12_21.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_21.2: type = converted %int.make_type_signed, %.loc12_21.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.2] // CHECK:STDOUT: adapt_decl %C [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.2 [template = constants.%complete_type.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.2 [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Adapter @@ -641,11 +621,11 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T.patt.loc7_9.2 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%complete_type.2 +// CHECK:STDOUT: %require_complete => constants.%complete_type.3 // CHECK:STDOUT: %C => constants.%C.2 // CHECK:STDOUT: %C.elem => constants.%C.elem.2 // CHECK:STDOUT: %struct_type.x => constants.%struct_type.x.2 -// CHECK:STDOUT: %complete_type.loc9_1.2 => constants.%complete_type.3 +// CHECK:STDOUT: %complete_type.loc9_1.2 => constants.%complete_type.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_import_extend_adapt_specific_type.carbon @@ -653,21 +633,20 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Adapter: type = class_type @Adapter [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %struct_type.x.1: type = struct_type {.x: %T} [symbolic] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x.1 [symbolic] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.x.1 [symbolic] // CHECK:STDOUT: %C.1: type = class_type @C, @C(%T) [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%i32) [template] // CHECK:STDOUT: %struct_type.x.2: type = struct_type {.x: %i32} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.x.2 [template] -// CHECK:STDOUT: %require_complete.1: = require_complete_type %T [symbolic] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.x.2 [template] +// CHECK:STDOUT: %require_complete.2: = require_complete_type %T [symbolic] // CHECK:STDOUT: %C.elem.1: type = unbound_element_type %C.1, %T [symbolic] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %i32 [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %i32.builtin [template] // CHECK:STDOUT: %C.elem.2: type = unbound_element_type %C.2, %i32 [template] -// CHECK:STDOUT: %Int.type: type = fn_type @Int [template] -// CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %ImportedAccess.type: type = fn_type @ImportedAccess [template] // CHECK:STDOUT: %ImportedAccess: %ImportedAccess.type = struct_value () [template] // CHECK:STDOUT: } @@ -676,17 +655,17 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %import_ref.1 = import_ref Main//extend_adapt_specific_type_library, C, unloaded // CHECK:STDOUT: %import_ref.2: type = import_ref Main//extend_adapt_specific_type_library, Adapter, loaded [template = constants.%Adapter] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref.10 -// CHECK:STDOUT: .ImplicitAs = %import_ref.11 +// CHECK:STDOUT: .Int = %import_ref.13 +// CHECK:STDOUT: .ImplicitAs = %import_ref.14 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref Main//extend_adapt_specific_type_library, loc9_1, loaded [symbolic = @C.%complete_type (constants.%complete_type.1)] -// CHECK:STDOUT: %import_ref.4 = import_ref Main//extend_adapt_specific_type_library, inst27 [no loc], unloaded -// CHECK:STDOUT: %import_ref.5: @C.%C.elem (%C.elem.1) = import_ref Main//extend_adapt_specific_type_library, loc8_8, loaded [template = %.1] -// CHECK:STDOUT: %import_ref.7: = import_ref Main//extend_adapt_specific_type_library, loc13_1, loaded [template = constants.%complete_type.2] -// CHECK:STDOUT: %import_ref.8 = import_ref Main//extend_adapt_specific_type_library, inst42 [no loc], unloaded -// CHECK:STDOUT: %import_ref.9: type = import_ref Main//extend_adapt_specific_type_library, loc12_21, loaded [template = constants.%C.2] +// CHECK:STDOUT: %import_ref.6: = import_ref Main//extend_adapt_specific_type_library, loc9_1, loaded [symbolic = @C.%complete_type (constants.%complete_type.2)] +// CHECK:STDOUT: %import_ref.7 = import_ref Main//extend_adapt_specific_type_library, inst27 [no loc], unloaded +// CHECK:STDOUT: %import_ref.8: @C.%C.elem (%C.elem.1) = import_ref Main//extend_adapt_specific_type_library, loc8_8, loaded [template = %.1] +// CHECK:STDOUT: %import_ref.10: = import_ref Main//extend_adapt_specific_type_library, loc13_1, loaded [template = constants.%complete_type.3] +// CHECK:STDOUT: %import_ref.11 = import_ref Main//extend_adapt_specific_type_library, inst42 [no loc], unloaded +// CHECK:STDOUT: %import_ref.12: type = import_ref Main//extend_adapt_specific_type_library, loc12_21, loaded [template = constants.%C.2] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -706,9 +685,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %Adapter.ref: type = name_ref Adapter, imports.%import_ref.2 [template = constants.%Adapter] // 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: %.loc6_34.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc6_34.2: type = converted %int.make_type_signed, %.loc6_34.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %Adapter = value_param runtime_param0 // CHECK:STDOUT: %a: %Adapter = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -718,9 +695,9 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: class @Adapter [from "extend_adapt_specific_type_library.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.8 -// CHECK:STDOUT: extend imports.%import_ref.9 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.7 +// CHECK:STDOUT: .Self = imports.%import_ref.11 +// CHECK:STDOUT: extend imports.%import_ref.12 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.10 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @C(constants.%T: type) [from "extend_adapt_specific_type_library.carbon"] { @@ -728,24 +705,24 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type @C.%T (%T) [symbolic = %require_complete (constants.%require_complete.1)] +// CHECK:STDOUT: %require_complete: = require_complete_type @C.%T (%T) [symbolic = %require_complete (constants.%require_complete.2)] // CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C.1)] // CHECK:STDOUT: %C.elem: type = unbound_element_type @C.%C (%C.1), @C.%T (%T) [symbolic = %C.elem (constants.%C.elem.1)] // CHECK:STDOUT: %struct_type.x: type = struct_type {.x: @C.%T (%T)} [symbolic = %struct_type.x (constants.%struct_type.x.1)] -// CHECK:STDOUT: %complete_type: = complete_type_witness @C.%struct_type.x (%struct_type.x.1) [symbolic = %complete_type (constants.%complete_type.1)] +// CHECK:STDOUT: %complete_type: = complete_type_witness @C.%struct_type.x (%struct_type.x.1) [symbolic = %complete_type (constants.%complete_type.2)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.4 -// CHECK:STDOUT: .x = imports.%import_ref.5 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.3 +// CHECK:STDOUT: .Self = imports.%import_ref.7 +// CHECK:STDOUT: .x = imports.%import_ref.8 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.6 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @ImportedAccess(%a.param_patt: %Adapter) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %Adapter = name_ref a, %a -// CHECK:STDOUT: %x.ref: %C.elem.2 = name_ref x, imports.%import_ref.5 [template = imports.%.1] +// CHECK:STDOUT: %x.ref: %C.elem.2 = name_ref x, imports.%import_ref.8 [template = imports.%.1] // CHECK:STDOUT: %.loc14_11.1: %C.2 = converted %a.ref, [template = ] // CHECK:STDOUT: %.loc14_11.2: %i32 = class_element_access , element0 [template = ] // CHECK:STDOUT: return @@ -761,11 +738,11 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T.patt => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%complete_type.3 +// CHECK:STDOUT: %require_complete => constants.%complete_type.4 // CHECK:STDOUT: %C => constants.%C.2 // CHECK:STDOUT: %C.elem => constants.%C.elem.2 // CHECK:STDOUT: %struct_type.x => constants.%struct_type.x.2 -// CHECK:STDOUT: %complete_type => constants.%complete_type.2 +// CHECK:STDOUT: %complete_type => constants.%complete_type.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(%T) { @@ -781,21 +758,21 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %Adapter.type: type = generic_class_type @Adapter [template] // CHECK:STDOUT: %Adapter.generic: %Adapter.type = struct_value () [template] // CHECK:STDOUT: %Adapter.1: type = class_type @Adapter, @Adapter(%T) [symbolic] -// CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic] +// CHECK:STDOUT: %require_complete.1: = require_complete_type %T [symbolic] // CHECK:STDOUT: %complete_type.1: = complete_type_witness %T [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Adapter.2: type = class_type @Adapter, @Adapter(%i32) [template] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert [template] // CHECK:STDOUT: %Convert: %Convert.type = struct_value () [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32 [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %i32.builtin [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -823,14 +800,10 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %Adapter.ref: %Adapter.type = name_ref Adapter, file.%Adapter.decl [template = constants.%Adapter.generic] // CHECK:STDOUT: %int_32.loc8_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc8_23: init type = call constants.%Int(%int_32.loc8_23) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_26.1: type = value_of_initializer %int.make_type_signed.loc8_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_26.2: type = converted %int.make_type_signed.loc8_23, %.loc8_26.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc8_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %Adapter: type = class_type @Adapter, @Adapter(constants.%i32) [template = constants.%Adapter.2] // CHECK:STDOUT: %int_32.loc8_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc8_32: init type = call constants.%Int(%int_32.loc8_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_32.1: type = value_of_initializer %int.make_type_signed.loc8_32 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_32.2: type = converted %int.make_type_signed.loc8_32, %.loc8_32.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc8_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %Adapter.2 = value_param runtime_param0 // CHECK:STDOUT: %a: %Adapter.2 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -843,7 +816,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T.patt.loc4_15.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_15.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type @Adapter.%T.loc4_15.2 (%T) [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type @Adapter.%T.loc4_15.2 (%T) [symbolic = %require_complete (constants.%require_complete.1)] // CHECK:STDOUT: %complete_type.loc6_1.2: = complete_type_witness @Adapter.%T.loc4_15.2 (%T) [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { @@ -861,9 +834,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %Adapter.2 = name_ref a, %a // CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%int_32.loc9) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_15.1: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_15.2: type = converted %int.make_type_signed.loc9, %.loc9_15.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc9_12.1: %i32 = as_compatible %a.ref // CHECK:STDOUT: %.loc9_12.2: %i32 = converted %a.ref, %.loc9_12.1 // CHECK:STDOUT: return %.loc9_12.2 @@ -879,8 +850,8 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T.patt.loc4_15.2 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%complete_type.2 -// CHECK:STDOUT: %complete_type.loc6_1.2 => constants.%complete_type.2 +// CHECK:STDOUT: %require_complete => constants.%complete_type.3 +// CHECK:STDOUT: %complete_type.loc6_1.2 => constants.%complete_type.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_adapt_generic_type.carbon @@ -891,23 +862,23 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %complete_type.1: = complete_type_witness %T [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic] +// CHECK:STDOUT: %require_complete.1: = require_complete_type %T [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Adapter.2: type = class_type @Adapter, @Adapter(%i32) [template] // CHECK:STDOUT: %ImportedConvert.type: type = fn_type @ImportedConvert [template] // CHECK:STDOUT: %ImportedConvert: %ImportedConvert.type = struct_value () [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32 [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %i32.builtin [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %i32 [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %i32 [template] // CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [template] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.n [template] +// CHECK:STDOUT: %complete_type.5: = complete_type_witness %struct_type.n [template] // CHECK:STDOUT: %Adapter.3: type = class_type @Adapter, @Adapter(%C) [template] // CHECK:STDOUT: %ImportedConvertLocal.type: type = fn_type @ImportedConvertLocal [template] // CHECK:STDOUT: %ImportedConvertLocal: %ImportedConvertLocal.type = struct_value () [template] -// CHECK:STDOUT: %complete_type.4: = complete_type_witness %C [template] +// CHECK:STDOUT: %complete_type.6: = complete_type_witness %C [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -941,14 +912,10 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %Adapter.ref: %Adapter.type = name_ref Adapter, imports.%import_ref.1 [template = constants.%Adapter.generic] // CHECK:STDOUT: %int_32.loc6_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_31: init type = call constants.%Int(%int_32.loc6_31) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_34.1: type = value_of_initializer %int.make_type_signed.loc6_31 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_34.2: type = converted %int.make_type_signed.loc6_31, %.loc6_34.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6_31: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %Adapter: type = class_type @Adapter, @Adapter(constants.%i32) [template = constants.%Adapter.2] // CHECK:STDOUT: %int_32.loc6_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_40: init type = call constants.%Int(%int_32.loc6_40) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_40.1: type = value_of_initializer %int.make_type_signed.loc6_40 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_40.2: type = converted %int.make_type_signed.loc6_40, %.loc6_40.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %Adapter.2 = value_param runtime_param0 // CHECK:STDOUT: %a: %Adapter.2 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -965,9 +932,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %C.ref.loc14: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Adapter: type = class_type @Adapter, @Adapter(constants.%C) [template = constants.%Adapter.3] // 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: %.loc14_43.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_43.2: type = converted %int.make_type_signed, %.loc14_43.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %Adapter.3 = value_param runtime_param0 // CHECK:STDOUT: %a: %Adapter.3 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -980,7 +945,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type @Adapter.%T (%T) [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type @Adapter.%T (%T) [symbolic = %require_complete (constants.%require_complete.1)] // CHECK:STDOUT: %complete_type: = complete_type_witness @Adapter.%T (%T) [symbolic = %complete_type (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { @@ -992,15 +957,13 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: class @C { // 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_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_10.2: type = converted %int.make_type_signed, %.loc11_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_8: %C.elem = field_decl n, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type.3] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11: %C.elem = field_decl n, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: .n = %.loc11_8 +// CHECK:STDOUT: .n = %.loc11 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1008,9 +971,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %Adapter.2 = name_ref a, %a // CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_15.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_15.2: type = converted %int.make_type_signed.loc7, %.loc7_15.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc7_12.1: %i32 = as_compatible %a.ref // CHECK:STDOUT: %.loc7_12.2: %i32 = converted %a.ref, %.loc7_12.1 // CHECK:STDOUT: return %.loc7_12.2 @@ -1022,7 +983,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %C.ref.loc15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc15_13.1: %C = as_compatible %a.ref // CHECK:STDOUT: %.loc15_13.2: %C = converted %a.ref, %.loc15_13.1 -// CHECK:STDOUT: %n.ref: %C.elem = name_ref n, @C.%.loc11_8 [template = @C.%.loc11_8] +// CHECK:STDOUT: %n.ref: %C.elem = name_ref n, @C.%.loc11 [template = @C.%.loc11] // CHECK:STDOUT: %.loc15_18.1: ref %i32 = class_element_access %.loc15_13.2, element0 // CHECK:STDOUT: %.loc15_18.2: %i32 = bind_value %.loc15_18.1 // CHECK:STDOUT: return %.loc15_18.2 @@ -1038,8 +999,8 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T.patt => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%complete_type.2 -// CHECK:STDOUT: %complete_type => constants.%complete_type.2 +// CHECK:STDOUT: %require_complete => constants.%complete_type.3 +// CHECK:STDOUT: %complete_type => constants.%complete_type.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Adapter(constants.%C) { @@ -1047,7 +1008,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %T.patt => constants.%C // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%complete_type.3 -// CHECK:STDOUT: %complete_type => constants.%complete_type.4 +// CHECK:STDOUT: %require_complete => constants.%complete_type.5 +// CHECK:STDOUT: %complete_type => constants.%complete_type.6 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/base_is_generic.carbon b/toolchain/check/testdata/class/generic/base_is_generic.carbon index 4f9da912f1a1..42d0a42729e5 100644 --- a/toolchain/check/testdata/class/generic/base_is_generic.carbon +++ b/toolchain/check/testdata/class/generic/base_is_generic.carbon @@ -92,33 +92,31 @@ fn H() { // CHECK:STDOUT: %Base.type: type = generic_class_type @Base [template] // CHECK:STDOUT: %Base.generic: %Base.type = struct_value () [template] // CHECK:STDOUT: %Base.1: type = class_type @Base, @Base(%T) [symbolic] -// CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic] +// CHECK:STDOUT: %require_complete.1: = require_complete_type %T [symbolic] // CHECK:STDOUT: %Base.elem.1: type = unbound_element_type %Base.1, %T [symbolic] // CHECK:STDOUT: %struct_type.x.1: type = struct_type {.x: %T} [symbolic] // CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x.1 [symbolic] // CHECK:STDOUT: %Param: type = class_type @Param [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Param.elem: type = unbound_element_type %Param, %i32 [template] // CHECK:STDOUT: %struct_type.y: type = struct_type {.y: %i32} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.y [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.y [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] // CHECK:STDOUT: %Base.2: type = class_type @Base, @Base(%Param) [template] // CHECK:STDOUT: %Base.elem.2: type = unbound_element_type %Base.2, %Param [template] // CHECK:STDOUT: %struct_type.x.2: type = struct_type {.x: %Param} [template] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.x.2 [template] +// CHECK:STDOUT: %complete_type.5: = complete_type_witness %struct_type.x.2 [template] // CHECK:STDOUT: %Derived.elem: type = unbound_element_type %Derived, %Base.2 [template] // CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %Base.2} [template] -// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.base.1 [template] +// CHECK:STDOUT: %complete_type.6: = complete_type_witness %struct_type.base.1 [template] // CHECK:STDOUT: %DoubleFieldAccess.type: type = fn_type @DoubleFieldAccess [template] // CHECK:STDOUT: %DoubleFieldAccess: %DoubleFieldAccess.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -150,9 +148,7 @@ fn H() { // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] // 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: %.loc16_37.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_37.2: type = converted %int.make_type_signed, %.loc16_37.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %d.param: %Derived = value_param runtime_param0 // CHECK:STDOUT: %d: %Derived = bind_name d, %d.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -165,7 +161,7 @@ fn H() { // CHECK:STDOUT: %T.patt.loc4_17.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_17.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type @Base.%T.loc4_17.2 (%T) [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type @Base.%T.loc4_17.2 (%T) [symbolic = %require_complete (constants.%require_complete.1)] // CHECK:STDOUT: %Base: type = class_type @Base, @Base(%T.loc4_17.2) [symbolic = %Base (constants.%Base.1)] // CHECK:STDOUT: %Base.elem: type = unbound_element_type @Base.%Base (%Base.1), @Base.%T.loc4_17.2 (%T) [symbolic = %Base.elem (constants.%Base.elem.1)] // CHECK:STDOUT: %struct_type.x: type = struct_type {.x: @Base.%T.loc4_17.2 (%T)} [symbolic = %struct_type.x (constants.%struct_type.x.1)] @@ -185,15 +181,13 @@ fn H() { // CHECK:STDOUT: // CHECK:STDOUT: class @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: %.loc9_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc9_10.2: type = converted %int.make_type_signed, %.loc9_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_8: %Param.elem = field_decl y, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.y [template = constants.%complete_type.2] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc9: %Param.elem = field_decl y, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.y [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Param -// CHECK:STDOUT: .y = %.loc9_8 +// CHECK:STDOUT: .y = %.loc9 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -202,7 +196,7 @@ fn H() { // CHECK:STDOUT: %Param.ref: type = name_ref Param, file.%Param.decl [template = constants.%Param] // CHECK:STDOUT: %Base: type = class_type @Base, @Base(constants.%Param) [template = constants.%Base.2] // CHECK:STDOUT: %.loc13: %Derived.elem = base_decl %Base, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -218,7 +212,7 @@ fn H() { // CHECK:STDOUT: %.loc17_11.1: ref %Base.2 = class_element_access %d.ref, element0 // CHECK:STDOUT: %.loc17_11.2: ref %Base.2 = converted %d.ref, %.loc17_11.1 // CHECK:STDOUT: %.loc17_11.3: ref %Param = class_element_access %.loc17_11.2, element0 -// CHECK:STDOUT: %y.ref: %Param.elem = name_ref y, @Param.%.loc9_8 [template = @Param.%.loc9_8] +// CHECK:STDOUT: %y.ref: %Param.elem = name_ref y, @Param.%.loc9 [template = @Param.%.loc9] // CHECK:STDOUT: %.loc17_13.1: ref %i32 = class_element_access %.loc17_11.3, element0 // CHECK:STDOUT: %.loc17_13.2: %i32 = bind_value %.loc17_13.1 // CHECK:STDOUT: return %.loc17_13.2 @@ -239,11 +233,11 @@ fn H() { // CHECK:STDOUT: %T.patt.loc4_17.2 => constants.%Param // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%complete_type.2 +// CHECK:STDOUT: %require_complete => constants.%complete_type.4 // CHECK:STDOUT: %Base => constants.%Base.2 // CHECK:STDOUT: %Base.elem => constants.%Base.elem.2 // CHECK:STDOUT: %struct_type.x => constants.%struct_type.x.2 -// CHECK:STDOUT: %complete_type.loc6_1.2 => constants.%complete_type.3 +// CHECK:STDOUT: %complete_type.loc6_1.2 => constants.%complete_type.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import.carbon @@ -252,24 +246,22 @@ fn H() { // CHECK:STDOUT: %Derived: type = class_type @Derived [template] // CHECK:STDOUT: %Param: type = class_type @Param [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %struct_type.y: type = struct_type {.y: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.y [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.y [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %struct_type.x.1: type = struct_type {.x: %T} [symbolic] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.x.1 [symbolic] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.x.1 [symbolic] // CHECK:STDOUT: %Base.1: type = class_type @Base, @Base(%T) [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Base.2: type = class_type @Base, @Base(%Param) [template] // CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %Base.2} [template] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.base.1 [template] -// CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.base.1 [template] +// CHECK:STDOUT: %require_complete.2: = require_complete_type %T [symbolic] // CHECK:STDOUT: %Base.elem.1: type = unbound_element_type %Base.1, %T [symbolic] // CHECK:STDOUT: %Base.elem.2: type = unbound_element_type %Base.2, %Param [template] // CHECK:STDOUT: %struct_type.x.2: type = struct_type {.x: %Param} [template] -// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.x.2 [template] -// CHECK:STDOUT: %Int.type: type = fn_type @Int [template] -// CHECK:STDOUT: %Int: %Int.type = struct_value () [template] +// CHECK:STDOUT: %complete_type.5: = complete_type_witness %struct_type.x.2 [template] // CHECK:STDOUT: %ImportedDoubleFieldAccess.type: type = fn_type @ImportedDoubleFieldAccess [template] // CHECK:STDOUT: %ImportedDoubleFieldAccess: %ImportedDoubleFieldAccess.type = struct_value () [template] // CHECK:STDOUT: %Param.elem: type = unbound_element_type %Param, %i32 [template] @@ -281,20 +273,20 @@ fn H() { // CHECK:STDOUT: %import_ref.3: type = import_ref Main//extend_generic_base, Derived, loaded [template = constants.%Derived] // CHECK:STDOUT: %import_ref.4 = import_ref Main//extend_generic_base, DoubleFieldAccess, unloaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref.16 +// CHECK:STDOUT: .Int = %import_ref.19 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: = import_ref Main//extend_generic_base, loc10_1, loaded [template = constants.%complete_type.1] -// CHECK:STDOUT: %import_ref.6 = import_ref Main//extend_generic_base, inst42 [no loc], unloaded -// CHECK:STDOUT: %import_ref.7: %Param.elem = import_ref Main//extend_generic_base, loc9_8, loaded [template = %.1] -// CHECK:STDOUT: %import_ref.8: = import_ref Main//extend_generic_base, loc6_1, loaded [symbolic = @Base.%complete_type (constants.%complete_type.2)] -// CHECK:STDOUT: %import_ref.9 = import_ref Main//extend_generic_base, inst27 [no loc], unloaded -// CHECK:STDOUT: %import_ref.10: @Base.%Base.elem (%Base.elem.1) = import_ref Main//extend_generic_base, loc5_8, loaded [template = %.2] -// CHECK:STDOUT: %import_ref.12: = import_ref Main//extend_generic_base, loc14_1, loaded [template = constants.%complete_type.3] -// CHECK:STDOUT: %import_ref.13 = import_ref Main//extend_generic_base, inst63 [no loc], unloaded -// CHECK:STDOUT: %import_ref.14 = import_ref Main//extend_generic_base, loc13_27, unloaded -// CHECK:STDOUT: %import_ref.15: type = import_ref Main//extend_generic_base, loc13_26, loaded [template = constants.%Base.2] +// CHECK:STDOUT: %import_ref.8: = import_ref Main//extend_generic_base, loc10_1, loaded [template = constants.%complete_type.2] +// CHECK:STDOUT: %import_ref.9 = import_ref Main//extend_generic_base, inst42 [no loc], unloaded +// CHECK:STDOUT: %import_ref.10: %Param.elem = import_ref Main//extend_generic_base, loc9_8, loaded [template = %.1] +// CHECK:STDOUT: %import_ref.11: = import_ref Main//extend_generic_base, loc6_1, loaded [symbolic = @Base.%complete_type (constants.%complete_type.3)] +// CHECK:STDOUT: %import_ref.12 = import_ref Main//extend_generic_base, inst27 [no loc], unloaded +// CHECK:STDOUT: %import_ref.13: @Base.%Base.elem (%Base.elem.1) = import_ref Main//extend_generic_base, loc5_8, loaded [template = %.2] +// CHECK:STDOUT: %import_ref.15: = import_ref Main//extend_generic_base, loc14_1, loaded [template = constants.%complete_type.4] +// CHECK:STDOUT: %import_ref.16 = import_ref Main//extend_generic_base, inst76 [no loc], unloaded +// CHECK:STDOUT: %import_ref.17 = import_ref Main//extend_generic_base, loc13_27, unloaded +// CHECK:STDOUT: %import_ref.18: type = import_ref Main//extend_generic_base, loc13_26, loaded [template = constants.%Base.2] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -316,9 +308,7 @@ fn H() { // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, imports.%import_ref.3 [template = constants.%Derived] // 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: %.loc6_45.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc6_45.2: type = converted %int.make_type_signed, %.loc6_45.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %d.param: %Derived = value_param runtime_param0 // CHECK:STDOUT: %d: %Derived = bind_name d, %d.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -328,17 +318,17 @@ fn H() { // CHECK:STDOUT: // CHECK:STDOUT: class @Derived [from "extend_generic_base.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.13 -// CHECK:STDOUT: .base = imports.%import_ref.14 -// CHECK:STDOUT: extend imports.%import_ref.15 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.12 +// CHECK:STDOUT: .Self = imports.%import_ref.16 +// CHECK:STDOUT: .base = imports.%import_ref.17 +// CHECK:STDOUT: extend imports.%import_ref.18 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Param [from "extend_generic_base.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.6 -// CHECK:STDOUT: .y = imports.%import_ref.7 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.5 +// CHECK:STDOUT: .Self = imports.%import_ref.9 +// CHECK:STDOUT: .y = imports.%import_ref.10 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @Base(constants.%T: type) [from "extend_generic_base.carbon"] { @@ -346,28 +336,28 @@ fn H() { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type @Base.%T (%T) [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type @Base.%T (%T) [symbolic = %require_complete (constants.%require_complete.2)] // CHECK:STDOUT: %Base: type = class_type @Base, @Base(%T) [symbolic = %Base (constants.%Base.1)] // CHECK:STDOUT: %Base.elem: type = unbound_element_type @Base.%Base (%Base.1), @Base.%T (%T) [symbolic = %Base.elem (constants.%Base.elem.1)] // CHECK:STDOUT: %struct_type.x: type = struct_type {.x: @Base.%T (%T)} [symbolic = %struct_type.x (constants.%struct_type.x.1)] -// CHECK:STDOUT: %complete_type: = complete_type_witness @Base.%struct_type.x (%struct_type.x.1) [symbolic = %complete_type (constants.%complete_type.2)] +// CHECK:STDOUT: %complete_type: = complete_type_witness @Base.%struct_type.x (%struct_type.x.1) [symbolic = %complete_type (constants.%complete_type.3)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.9 -// CHECK:STDOUT: .x = imports.%import_ref.10 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.8 +// CHECK:STDOUT: .Self = imports.%import_ref.12 +// CHECK:STDOUT: .x = imports.%import_ref.13 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.11 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @ImportedDoubleFieldAccess(%d.param_patt: %Derived) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %d.ref: %Derived = name_ref d, %d -// CHECK:STDOUT: %x.ref: %Base.elem.2 = name_ref x, imports.%import_ref.10 [template = imports.%.2] +// CHECK:STDOUT: %x.ref: %Base.elem.2 = name_ref x, imports.%import_ref.13 [template = imports.%.2] // CHECK:STDOUT: %.loc7_11.1: ref %Base.2 = class_element_access %d.ref, element0 // CHECK:STDOUT: %.loc7_11.2: ref %Base.2 = converted %d.ref, %.loc7_11.1 // CHECK:STDOUT: %.loc7_11.3: ref %Param = class_element_access %.loc7_11.2, element0 -// CHECK:STDOUT: %y.ref: %Param.elem = name_ref y, imports.%import_ref.7 [template = imports.%.1] +// CHECK:STDOUT: %y.ref: %Param.elem = name_ref y, imports.%import_ref.10 [template = imports.%.1] // CHECK:STDOUT: %.loc7_13.1: ref %i32 = class_element_access %.loc7_11.3, element0 // CHECK:STDOUT: %.loc7_13.2: %i32 = bind_value %.loc7_13.1 // CHECK:STDOUT: return %.loc7_13.2 @@ -383,11 +373,11 @@ fn H() { // CHECK:STDOUT: %T.patt => constants.%Param // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%complete_type.1 +// CHECK:STDOUT: %require_complete => constants.%complete_type.2 // CHECK:STDOUT: %Base => constants.%Base.2 // CHECK:STDOUT: %Base.elem => constants.%Base.elem.2 // CHECK:STDOUT: %struct_type.x => constants.%struct_type.x.2 -// CHECK:STDOUT: %complete_type => constants.%complete_type.4 +// CHECK:STDOUT: %complete_type => constants.%complete_type.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Base(%T) { @@ -526,23 +516,22 @@ fn H() { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %i32.builtin [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%i32) [template] // CHECK:STDOUT: %X.3: type = class_type @X, @X(%i32) [template] // CHECK:STDOUT: %G.type.3: type = fn_type @G, @X(%i32) [template] // CHECK:STDOUT: %G.3: %G.type.3 = struct_value () [template] // CHECK:STDOUT: %C.elem.2: type = unbound_element_type %C.2, %X.3 [template] // CHECK:STDOUT: %struct_type.base.2: type = struct_type {.base: %X.3} [template] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.base.2 [template] +// CHECK:STDOUT: %complete_type.5: = complete_type_witness %struct_type.base.2 [template] // CHECK:STDOUT: %G.specific_fn.2: = specific_function %G.3, @G(%i32) [template] -// CHECK:STDOUT: %complete_type.4: = complete_type_witness %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -650,14 +639,10 @@ fn H() { // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_32.loc13_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_10: init type = call constants.%Int(%int_32.loc13_10) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_signed.loc13_10 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_signed.loc13_10, %.loc13_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] // CHECK:STDOUT: %int_32.loc13_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_18: init type = call constants.%Int(%int_32.loc13_18) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_21.1: type = value_of_initializer %int.make_type_signed.loc13_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_21.2: type = converted %int.make_type_signed.loc13_18, %.loc13_21.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.2] // CHECK:STDOUT: %.loc13_22: %G.type.3 = specific_constant @X.%G.decl, @X(constants.%i32) [template = constants.%G.3] // CHECK:STDOUT: %G.ref: %G.type.3 = name_ref G, %.loc13_22 [template = constants.%G.3] @@ -736,7 +721,7 @@ fn H() { // CHECK:STDOUT: %C => constants.%C.2 // CHECK:STDOUT: %C.elem => constants.%C.elem.2 // CHECK:STDOUT: %struct_type.base => constants.%struct_type.base.2 -// CHECK:STDOUT: %complete_type.loc10_1.2 => constants.%complete_type.3 +// CHECK:STDOUT: %complete_type.loc10_1.2 => constants.%complete_type.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @X(constants.%i32) { @@ -764,26 +749,26 @@ fn H() { // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32.builtin [template] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %X.2: type = class_type @X, @X(%T) [symbolic] // CHECK:STDOUT: %C.1: type = class_type @C, @C(%T) [symbolic] // CHECK:STDOUT: %C.elem.1: type = unbound_element_type %C.1, %X.2 [symbolic] // CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %X.2} [symbolic] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [symbolic] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.base.1 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %G.type.1: type = fn_type @G, @X(%U) [symbolic] // CHECK:STDOUT: %G.1: %G.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %require_complete.1: = require_complete_type %X.2 [symbolic] -// CHECK:STDOUT: %require_complete.2: = require_complete_type %U [symbolic] +// CHECK:STDOUT: %require_complete.2: = require_complete_type %X.2 [symbolic] +// CHECK:STDOUT: %require_complete.3: = require_complete_type %U [symbolic] // CHECK:STDOUT: %G.specific_fn.1: = specific_function %G.1, @G(%U) [symbolic] // CHECK:STDOUT: %G.type.2: type = fn_type @G, @X(%T) [symbolic] // CHECK:STDOUT: %G.2: %G.type.2 = struct_value () [symbolic] @@ -793,9 +778,8 @@ fn H() { // CHECK:STDOUT: %G.3: %G.type.3 = struct_value () [template] // CHECK:STDOUT: %C.elem.2: type = unbound_element_type %C.2, %X.3 [template] // CHECK:STDOUT: %struct_type.base.2: type = struct_type {.base: %X.3} [template] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.base.2 [template] +// CHECK:STDOUT: %complete_type.5: = complete_type_witness %struct_type.base.2 [template] // CHECK:STDOUT: %G.specific_fn.2: = specific_function %G.3, @G(%i32) [template] -// CHECK:STDOUT: %complete_type.4: = complete_type_witness %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -807,13 +791,13 @@ fn H() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: = import_ref Main//extend_generic_symbolic_base, loc6_1, loaded [template = constants.%complete_type.1] -// CHECK:STDOUT: %import_ref.6 = import_ref Main//extend_generic_symbolic_base, inst27 [no loc], unloaded -// CHECK:STDOUT: %import_ref.7: @X.%G.type (%G.type.1) = import_ref Main//extend_generic_symbolic_base, loc5_15, loaded [symbolic = @X.%G (constants.%G.1)] -// CHECK:STDOUT: %import_ref.9: = import_ref Main//extend_generic_symbolic_base, loc10_1, loaded [symbolic = @C.%complete_type (constants.%complete_type.2)] -// CHECK:STDOUT: %import_ref.10 = import_ref Main//extend_generic_symbolic_base, inst68 [no loc], unloaded -// CHECK:STDOUT: %import_ref.11 = import_ref Main//extend_generic_symbolic_base, loc9_20, unloaded -// CHECK:STDOUT: %import_ref.12: type = import_ref Main//extend_generic_symbolic_base, loc9_19, loaded [symbolic = @C.%X (constants.%X.2)] +// CHECK:STDOUT: %import_ref.8: = import_ref Main//extend_generic_symbolic_base, loc6_1, loaded [template = constants.%complete_type.3] +// CHECK:STDOUT: %import_ref.9 = import_ref Main//extend_generic_symbolic_base, inst27 [no loc], unloaded +// CHECK:STDOUT: %import_ref.10: @X.%G.type (%G.type.1) = import_ref Main//extend_generic_symbolic_base, loc5_15, loaded [symbolic = @X.%G (constants.%G.1)] +// CHECK:STDOUT: %import_ref.12: = import_ref Main//extend_generic_symbolic_base, loc10_1, loaded [symbolic = @C.%complete_type (constants.%complete_type.4)] +// CHECK:STDOUT: %import_ref.13 = import_ref Main//extend_generic_symbolic_base, inst68 [no loc], unloaded +// CHECK:STDOUT: %import_ref.14 = import_ref Main//extend_generic_symbolic_base, loc9_20, unloaded +// CHECK:STDOUT: %import_ref.15: type = import_ref Main//extend_generic_symbolic_base, loc9_19, loaded [symbolic = @C.%X (constants.%X.2)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -835,18 +819,18 @@ fn H() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %X: type = class_type @X, @X(%T) [symbolic = %X (constants.%X.2)] -// CHECK:STDOUT: %require_complete: = require_complete_type @C.%X (%X.2) [symbolic = %require_complete (constants.%require_complete.1)] +// CHECK:STDOUT: %require_complete: = require_complete_type @C.%X (%X.2) [symbolic = %require_complete (constants.%require_complete.2)] // CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C.1)] // CHECK:STDOUT: %C.elem: type = unbound_element_type @C.%C (%C.1), @C.%X (%X.2) [symbolic = %C.elem (constants.%C.elem.1)] // CHECK:STDOUT: %struct_type.base: type = struct_type {.base: @C.%X (%X.2)} [symbolic = %struct_type.base (constants.%struct_type.base.1)] -// CHECK:STDOUT: %complete_type: = complete_type_witness @C.%struct_type.base (%struct_type.base.1) [symbolic = %complete_type (constants.%complete_type.2)] +// CHECK:STDOUT: %complete_type: = complete_type_witness @C.%struct_type.base (%struct_type.base.1) [symbolic = %complete_type (constants.%complete_type.4)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.10 -// CHECK:STDOUT: .base = imports.%import_ref.11 -// CHECK:STDOUT: extend imports.%import_ref.12 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.9 +// CHECK:STDOUT: .Self = imports.%import_ref.13 +// CHECK:STDOUT: .base = imports.%import_ref.14 +// CHECK:STDOUT: extend imports.%import_ref.15 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.12 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -860,25 +844,21 @@ fn H() { // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.6 -// CHECK:STDOUT: .G = imports.%import_ref.7 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.5 +// CHECK:STDOUT: .Self = imports.%import_ref.9 +// CHECK:STDOUT: .G = imports.%import_ref.10 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.8 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @H() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_32.loc7_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_10: init type = call constants.%Int(%int_32.loc7_10) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_10.1: type = value_of_initializer %int.make_type_signed.loc7_10 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_10.2: type = converted %int.make_type_signed.loc7_10, %.loc7_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.2 [template = constants.%C.generic] // CHECK:STDOUT: %int_32.loc7_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_18: init type = call constants.%Int(%int_32.loc7_18) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_21.1: type = value_of_initializer %int.make_type_signed.loc7_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_21.2: type = converted %int.make_type_signed.loc7_18, %.loc7_21.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.2] -// CHECK:STDOUT: %.loc7_22: %G.type.3 = specific_constant imports.%import_ref.7, @X(constants.%i32) [template = constants.%G.3] +// CHECK:STDOUT: %.loc7_22: %G.type.3 = specific_constant imports.%import_ref.10, @X(constants.%i32) [template = constants.%G.3] // CHECK:STDOUT: %G.ref: %G.type.3 = name_ref G, %.loc7_22 [template = constants.%G.3] // CHECK:STDOUT: %G.specific_fn: = specific_function %G.ref, @G(constants.%i32) [template = constants.%G.specific_fn.2] // CHECK:STDOUT: %G.call: init %i32 = call %G.specific_fn() @@ -892,7 +872,7 @@ fn H() { // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic = %U (constants.%U)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type @G.%U (%U) [symbolic = %require_complete (constants.%require_complete.2)] +// CHECK:STDOUT: %require_complete: = require_complete_type @G.%U (%U) [symbolic = %require_complete (constants.%require_complete.3)] // CHECK:STDOUT: %G.type: type = fn_type @G, @X(%U) [symbolic = %G.type (constants.%G.type.1)] // CHECK:STDOUT: %G: @G.%G.type (%G.type.1) = struct_value () [symbolic = %G (constants.%G.1)] // CHECK:STDOUT: %G.specific_fn: = specific_function %G, @G(%U) [symbolic = %G.specific_fn (constants.%G.specific_fn.1)] @@ -942,7 +922,7 @@ fn H() { // CHECK:STDOUT: %U => constants.%U // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%require_complete.2 +// CHECK:STDOUT: %require_complete => constants.%require_complete.3 // CHECK:STDOUT: %G.type => constants.%G.type.1 // CHECK:STDOUT: %G => constants.%G.1 // CHECK:STDOUT: %G.specific_fn => constants.%G.specific_fn.1 @@ -963,11 +943,11 @@ fn H() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %X => constants.%X.3 -// CHECK:STDOUT: %require_complete => constants.%complete_type.1 +// CHECK:STDOUT: %require_complete => constants.%complete_type.3 // CHECK:STDOUT: %C => constants.%C.2 // CHECK:STDOUT: %C.elem => constants.%C.elem.2 // CHECK:STDOUT: %struct_type.base => constants.%struct_type.base.2 -// CHECK:STDOUT: %complete_type => constants.%complete_type.3 +// CHECK:STDOUT: %complete_type => constants.%complete_type.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @X(constants.%i32) { @@ -983,7 +963,7 @@ fn H() { // CHECK:STDOUT: %U => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%complete_type.4 +// CHECK:STDOUT: %require_complete => constants.%complete_type.2 // CHECK:STDOUT: %G.type => constants.%G.type.3 // CHECK:STDOUT: %G => constants.%G.3 // CHECK:STDOUT: %G.specific_fn => constants.%G.specific_fn.2 diff --git a/toolchain/check/testdata/class/generic/call.carbon b/toolchain/check/testdata/class/generic/call.carbon index 1f3613066ef5..066cbe25b9e8 100644 --- a/toolchain/check/testdata/class/generic/call.carbon +++ b/toolchain/check/testdata/class/generic/call.carbon @@ -91,29 +91,27 @@ class Outer(T:! type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // 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, %int_32 [template] -// CHECK:STDOUT: %N.1: %i32 = bind_symbolic_name N, 1 [symbolic] -// CHECK:STDOUT: %N.patt.1: %i32 = symbolic_binding_pattern N, 1 [symbolic] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %N.2: %i32 = bind_symbolic_name N, 1 [symbolic] +// CHECK:STDOUT: %N.patt.2: %i32 = symbolic_binding_pattern N, 1 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template] -// CHECK:STDOUT: %Class.1: type = class_type @Class, @Class(%T, %N.1) [symbolic] +// CHECK:STDOUT: %Class.1: type = class_type @Class, @Class(%T, %N.2) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %ptr.1: type = ptr_type %i32 [template] // CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_5.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] // CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%ptr.1, %int_5.2) [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %Class.3: type = class_type @Class, @Class(%empty_tuple.type, %int_0.2) [template] @@ -122,7 +120,7 @@ class Outer(T:! type) { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -139,26 +137,22 @@ class Outer(T:! type) { // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc4_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_13.1, runtime_param [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] -// CHECK:STDOUT: %N.patt.loc4_23.1: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.1)] -// CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc4_23.1, runtime_param [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.1)] +// CHECK:STDOUT: %N.patt.loc4_23.1: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.2)] +// CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc4_23.1, runtime_param [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.2)] // CHECK:STDOUT: } { // 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_27.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed, %.loc4_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param -// CHECK:STDOUT: %N.loc4_23.1: %i32 = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc4_23.2 (constants.%N.1)] +// CHECK:STDOUT: %N.loc4_23.1: %i32 = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc4_23.2 (constants.%N.2)] // CHECK:STDOUT: } // CHECK:STDOUT: %Class.ref.loc6: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.generic] // 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: %.loc6_17.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc6_17.2: type = converted %int.make_type_signed, %.loc6_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr.1] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] -// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc6: = bound_method %int_5, %impl.elem0.loc6 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc6: = specific_function %Convert.bound.loc6, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %Convert.specific_fn.loc6(%int_5) [template = constants.%int_5.2] @@ -171,7 +165,7 @@ class Outer(T:! type) { // CHECK:STDOUT: %.loc9_15: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc9_19.1: type = converted %.loc9_15, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %impl.elem0.loc9: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9: = bound_method %int_0, %impl.elem0.loc9 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc9: = specific_function %Convert.bound.loc9, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %Convert.specific_fn.loc9(%int_0) [template = constants.%int_0.2] @@ -185,13 +179,13 @@ class Outer(T:! type) { // CHECK:STDOUT: generic class @Class(%T.loc4_13.1: type, %N.loc4_23.1: %i32) { // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc4_13.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] -// CHECK:STDOUT: %N.loc4_23.2: %i32 = bind_symbolic_name N, 1 [symbolic = %N.loc4_23.2 (constants.%N.1)] -// CHECK:STDOUT: %N.patt.loc4_23.2: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.1)] +// CHECK:STDOUT: %N.loc4_23.2: %i32 = bind_symbolic_name N, 1 [symbolic = %N.loc4_23.2 (constants.%N.2)] +// CHECK:STDOUT: %N.patt.loc4_23.2: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class.1 @@ -199,11 +193,11 @@ class Outer(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(constants.%T, constants.%N.1) { +// CHECK:STDOUT: specific @Class(constants.%T, constants.%N.2) { // CHECK:STDOUT: %T.loc4_13.2 => constants.%T // CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%T -// CHECK:STDOUT: %N.loc4_23.2 => constants.%N.1 -// CHECK:STDOUT: %N.patt.loc4_23.2 => constants.%N.1 +// CHECK:STDOUT: %N.loc4_23.2 => constants.%N.2 +// CHECK:STDOUT: %N.patt.loc4_23.2 => constants.%N.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(constants.%ptr.1, constants.%int_5.2) { @@ -230,22 +224,20 @@ class Outer(T:! type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [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, %int_32 [template] -// CHECK:STDOUT: %N: %i32 = bind_symbolic_name N, 1 [symbolic] -// CHECK:STDOUT: %N.patt: %i32 = symbolic_binding_pattern N, 1 [symbolic] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %N.2: %i32 = bind_symbolic_name N, 1 [symbolic] +// CHECK:STDOUT: %N.patt.2: %i32 = symbolic_binding_pattern N, 1 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T, %N) [symbolic] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T, %N.2) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %ptr: type = ptr_type %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -261,23 +253,19 @@ class Outer(T:! type) { // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc4_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_13.1, runtime_param [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] -// CHECK:STDOUT: %N.patt.loc4_23.1: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt)] -// CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc4_23.1, runtime_param [symbolic = %N.patt.loc4_23.2 (constants.%N.patt)] +// CHECK:STDOUT: %N.patt.loc4_23.1: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.2)] +// CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc4_23.1, runtime_param [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.2)] // CHECK:STDOUT: } { // 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_27.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed, %.loc4_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param -// CHECK:STDOUT: %N.loc4_23.1: %i32 = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc4_23.2 (constants.%N)] +// CHECK:STDOUT: %N.loc4_23.1: %i32 = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc4_23.2 (constants.%N.2)] // CHECK:STDOUT: } // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.generic] // 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_17.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_17.2: type = converted %int.make_type_signed, %.loc13_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var @@ -286,13 +274,13 @@ class Outer(T:! type) { // CHECK:STDOUT: generic class @Class(%T.loc4_13.1: type, %N.loc4_23.1: %i32) { // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc4_13.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] -// CHECK:STDOUT: %N.loc4_23.2: %i32 = bind_symbolic_name N, 1 [symbolic = %N.loc4_23.2 (constants.%N)] -// CHECK:STDOUT: %N.patt.loc4_23.2: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt)] +// CHECK:STDOUT: %N.loc4_23.2: %i32 = bind_symbolic_name N, 1 [symbolic = %N.loc4_23.2 (constants.%N.2)] +// CHECK:STDOUT: %N.patt.loc4_23.2: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -300,11 +288,11 @@ class Outer(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(constants.%T, constants.%N) { +// CHECK:STDOUT: specific @Class(constants.%T, constants.%N.2) { // CHECK:STDOUT: %T.loc4_13.2 => constants.%T // CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%T -// CHECK:STDOUT: %N.loc4_23.2 => constants.%N -// CHECK:STDOUT: %N.patt.loc4_23.2 => constants.%N +// CHECK:STDOUT: %N.loc4_23.2 => constants.%N.2 +// CHECK:STDOUT: %N.patt.loc4_23.2 => constants.%N.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_too_many.carbon @@ -313,16 +301,14 @@ class Outer(T:! type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [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, %int_32 [template] -// CHECK:STDOUT: %N: %i32 = bind_symbolic_name N, 1 [symbolic] -// CHECK:STDOUT: %N.patt: %i32 = symbolic_binding_pattern N, 1 [symbolic] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %N.2: %i32 = bind_symbolic_name N, 1 [symbolic] +// CHECK:STDOUT: %N.patt.2: %i32 = symbolic_binding_pattern N, 1 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T, %N) [symbolic] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T, %N.2) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %ptr: type = ptr_type %i32 [template] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] @@ -330,7 +316,7 @@ class Outer(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -346,23 +332,19 @@ class Outer(T:! type) { // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc4_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_13.1, runtime_param [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] -// CHECK:STDOUT: %N.patt.loc4_23.1: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt)] -// CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc4_23.1, runtime_param [symbolic = %N.patt.loc4_23.2 (constants.%N.patt)] +// CHECK:STDOUT: %N.patt.loc4_23.1: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.2)] +// CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc4_23.1, runtime_param [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.2)] // CHECK:STDOUT: } { // 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_27.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed, %.loc4_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param -// CHECK:STDOUT: %N.loc4_23.1: %i32 = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc4_23.2 (constants.%N)] +// CHECK:STDOUT: %N.loc4_23.1: %i32 = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc4_23.2 (constants.%N.2)] // CHECK:STDOUT: } // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.generic] // 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_17.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_17.2: type = converted %int.make_type_signed, %.loc13_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr] // 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] @@ -373,13 +355,13 @@ class Outer(T:! type) { // CHECK:STDOUT: generic class @Class(%T.loc4_13.1: type, %N.loc4_23.1: %i32) { // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc4_13.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] -// CHECK:STDOUT: %N.loc4_23.2: %i32 = bind_symbolic_name N, 1 [symbolic = %N.loc4_23.2 (constants.%N)] -// CHECK:STDOUT: %N.patt.loc4_23.2: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt)] +// CHECK:STDOUT: %N.loc4_23.2: %i32 = bind_symbolic_name N, 1 [symbolic = %N.loc4_23.2 (constants.%N.2)] +// CHECK:STDOUT: %N.patt.loc4_23.2: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -387,11 +369,11 @@ class Outer(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(constants.%T, constants.%N) { +// CHECK:STDOUT: specific @Class(constants.%T, constants.%N.2) { // CHECK:STDOUT: %T.loc4_13.2 => constants.%T // CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%T -// CHECK:STDOUT: %N.loc4_23.2 => constants.%N -// CHECK:STDOUT: %N.patt.loc4_23.2 => constants.%N +// CHECK:STDOUT: %N.loc4_23.2 => constants.%N.2 +// CHECK:STDOUT: %N.patt.loc4_23.2 => constants.%N.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_no_conversion.carbon @@ -400,16 +382,14 @@ class Outer(T:! type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [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, %int_32 [template] -// CHECK:STDOUT: %N.1: %i32 = bind_symbolic_name N, 1 [symbolic] -// CHECK:STDOUT: %N.patt.1: %i32 = symbolic_binding_pattern N, 1 [symbolic] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %N.2: %i32 = bind_symbolic_name N, 1 [symbolic] +// CHECK:STDOUT: %N.patt.2: %i32 = symbolic_binding_pattern N, 1 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T, %N.1) [symbolic] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T, %N.2) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template] // CHECK:STDOUT: %ptr: type = ptr_type %i32 [template] // CHECK:STDOUT: } @@ -417,7 +397,7 @@ class Outer(T:! type) { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -433,26 +413,22 @@ class Outer(T:! type) { // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [template = constants.%Class.generic] { // CHECK:STDOUT: %T.patt.loc4_13.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc4_13.1, runtime_param [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] -// CHECK:STDOUT: %N.patt.loc4_23.1: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.1)] -// CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc4_23.1, runtime_param [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.1)] +// CHECK:STDOUT: %N.patt.loc4_23.1: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.2)] +// CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc4_23.1, runtime_param [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.2)] // CHECK:STDOUT: } { // 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_27.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed, %.loc4_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param -// CHECK:STDOUT: %N.loc4_23.1: %i32 = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc4_23.2 (constants.%N.1)] +// CHECK:STDOUT: %N.loc4_23.1: %i32 = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc4_23.2 (constants.%N.2)] // CHECK:STDOUT: } // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.generic] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5] // 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: %.loc15_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_20.2: type = converted %int.make_type_signed, %.loc15_20.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr] -// CHECK:STDOUT: %.loc15_21: type = converted %int_5, [template = ] +// CHECK:STDOUT: %.loc15: type = converted %int_5, [template = ] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var // CHECK:STDOUT: } @@ -460,13 +436,13 @@ class Outer(T:! type) { // CHECK:STDOUT: generic class @Class(%T.loc4_13.1: type, %N.loc4_23.1: %i32) { // CHECK:STDOUT: %T.loc4_13.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc4_13.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_13.2 (constants.%T.patt)] -// CHECK:STDOUT: %N.loc4_23.2: %i32 = bind_symbolic_name N, 1 [symbolic = %N.loc4_23.2 (constants.%N.1)] -// CHECK:STDOUT: %N.patt.loc4_23.2: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.1)] +// CHECK:STDOUT: %N.loc4_23.2: %i32 = bind_symbolic_name N, 1 [symbolic = %N.loc4_23.2 (constants.%N.2)] +// CHECK:STDOUT: %N.patt.loc4_23.2: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -474,11 +450,11 @@ class Outer(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(constants.%T, constants.%N.1) { +// CHECK:STDOUT: specific @Class(constants.%T, constants.%N.2) { // CHECK:STDOUT: %T.loc4_13.2 => constants.%T // CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%T -// CHECK:STDOUT: %N.loc4_23.2 => constants.%N.1 -// CHECK:STDOUT: %N.patt.loc4_23.2 => constants.%N.1 +// CHECK:STDOUT: %N.loc4_23.2 => constants.%N.2 +// CHECK:STDOUT: %N.patt.loc4_23.2 => constants.%N.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- call_in_nested_return_type.carbon diff --git a/toolchain/check/testdata/class/generic/complete_in_conversion.carbon b/toolchain/check/testdata/class/generic/complete_in_conversion.carbon index 6ab05b239223..87243bb9824d 100644 --- a/toolchain/check/testdata/class/generic/complete_in_conversion.carbon +++ b/toolchain/check/testdata/class/generic/complete_in_conversion.carbon @@ -10,15 +10,17 @@ // --- fail_derived_to_base.carbon +fn Int(N: Core.IntLiteral()) -> type = "int.make_type_signed"; + base class B {} class A(N:! i32) { extend base: B; // CHECK:STDERR: fail_derived_to_base.carbon:[[@LINE+3]]:10: error: integer type width of 0 is not positive [IntWidthNotPositive] - // CHECK:STDERR: var n: Core.Int(N); - // CHECK:STDERR: ^~~~~~~~~~~ - var n: Core.Int(N); + // CHECK:STDERR: var n: Int(N); + // CHECK:STDERR: ^~~~~~ + var n: Int(N); } fn F(a: A(0)*) { @@ -31,37 +33,39 @@ fn F(a: A(0)*) { // CHECK:STDOUT: --- fail_derived_to_base.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [template] +// CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [template] +// CHECK:STDOUT: %Int.type.1: type = fn_type @Int.1 [template] +// CHECK:STDOUT: %Int.1: %Int.type.1 = struct_value () [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [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, %int_32 [template] -// CHECK:STDOUT: %N.1: %i32 = bind_symbolic_name N, 0 [symbolic] -// CHECK:STDOUT: %N.patt.1: %i32 = symbolic_binding_pattern N, 0 [symbolic] +// CHECK:STDOUT: %i32: type = class_type @Int.2, @Int.2(%int_32) [template] +// CHECK:STDOUT: %N.2: %i32 = bind_symbolic_name N, 0 [symbolic] +// CHECK:STDOUT: %N.patt.2: %i32 = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %A.type: type = generic_class_type @A [template] // CHECK:STDOUT: %A.generic: %A.type = struct_value () [template] -// CHECK:STDOUT: %A.1: type = class_type @A, @A(%N.1) [symbolic] +// CHECK:STDOUT: %A.1: type = class_type @A, @A(%N.2) [symbolic] // CHECK:STDOUT: %A.elem.1: type = unbound_element_type %A.1, %B [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.13) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %N.1, %Convert.13 [symbolic] -// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.4(%int_32) [symbolic] -// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %Convert.specific_fn.1(%N.1) [symbolic] -// CHECK:STDOUT: %iN.2: type = int_type signed, %int.convert_checked [symbolic] -// CHECK:STDOUT: %require_complete.7: = require_complete_type %iN.2 [symbolic] -// CHECK:STDOUT: %A.elem.2: type = unbound_element_type %A.1, %iN.2 [symbolic] -// CHECK:STDOUT: %struct_type.base.n: type = struct_type {.base: %B, .n: %iN.2} [symbolic] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.base.n [symbolic] +// CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.9) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %N.2, %Convert.9 [symbolic] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.3(%int_32) [symbolic] +// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %Convert.specific_fn.1(%N.2) [symbolic] +// CHECK:STDOUT: %iN.builtin.2: type = int_type signed, %int.convert_checked [symbolic] +// CHECK:STDOUT: %require_complete.5: = require_complete_type %iN.builtin.2 [symbolic] +// CHECK:STDOUT: %A.elem.2: type = unbound_element_type %A.1, %iN.builtin.2 [symbolic] +// CHECK:STDOUT: %struct_type.base.n: type = struct_type {.base: %B, .n: %iN.builtin.2} [symbolic] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.base.n [symbolic] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.15 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %A.2: type = class_type @A, @A(%int_0.2) [template] @@ -70,39 +74,55 @@ fn F(a: A(0)*) { // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %ptr.3: type = ptr_type %B [template] // CHECK:STDOUT: %A.elem.3: type = unbound_element_type %A.2, %B [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.2, %Convert.13 [template] -// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.2, %Convert.9 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.3(%int_32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .IntLiteral = %import_ref.1 +// CHECK:STDOUT: .Int = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.6 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %Int.type = import_ref Core//prelude/types, Int, loaded [template = constants.%Int] +// CHECK:STDOUT: %import_ref.1: %IntLiteral.type = import_ref Core//prelude/types/int_literal, IntLiteral, loaded [template = constants.%IntLiteral] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Core = imports.%Core +// CHECK:STDOUT: .Int = %Int.decl // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core +// CHECK:STDOUT: %Int.decl: %Int.type.1 = fn_decl @Int.1 [template = constants.%Int.1] { +// CHECK:STDOUT: %N.patt: Core.IntLiteral = binding_pattern N +// CHECK:STDOUT: %N.param_patt: Core.IntLiteral = value_param_pattern %N.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: } { +// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] +// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral] +// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc2_27.2: type = converted %int_literal.make_type, %.loc2_27.1 [template = Core.IntLiteral] +// CHECK:STDOUT: %N.param: Core.IntLiteral = value_param runtime_param0 +// CHECK:STDOUT: %N: Core.IntLiteral = bind_name N, %N.param +// CHECK:STDOUT: %return.param: ref type = out_param runtime_param1 +// CHECK:STDOUT: %return: ref type = return_slot %return.param +// CHECK:STDOUT: } // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} {} // CHECK:STDOUT: %A.decl: %A.type = class_decl @A [template = constants.%A.generic] { -// CHECK:STDOUT: %N.patt.loc4_9.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_9.2 (constants.%N.patt.1)] -// CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc4_9.1, runtime_param [symbolic = %N.patt.loc4_9.2 (constants.%N.patt.1)] +// CHECK:STDOUT: %N.patt.loc6_9.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_9.2 (constants.%N.patt.2)] +// CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc6_9.1, runtime_param [symbolic = %N.patt.loc6_9.2 (constants.%N.patt.2)] // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%int_32) [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: %i32: type = class_type @Int.2, @Int.2(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param -// CHECK:STDOUT: %N.loc4_9.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc4_9.2 (constants.%N.1)] +// CHECK:STDOUT: %N.loc6_9.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc6_9.2 (constants.%N.2)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %a.patt: %ptr.2 = binding_pattern a @@ -110,14 +130,14 @@ fn F(a: A(0)*) { // CHECK:STDOUT: } { // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A.generic] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.14 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %impl.elem0: %Convert.type.10 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc13_12.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc13_12.2: %i32 = converted %int_0, %.loc13_12.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc15_12.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc15_12.2: %i32 = converted %int_0, %.loc15_12.1 [template = constants.%int_0.2] // CHECK:STDOUT: %A: type = class_type @A, @A(constants.%int_0.2) [template = constants.%A.2] -// CHECK:STDOUT: %ptr.loc13: type = ptr_type %A.2 [template = constants.%ptr.2] +// CHECK:STDOUT: %ptr.loc15: type = ptr_type %A.2 [template = constants.%ptr.2] // CHECK:STDOUT: %a.param: %ptr.2 = value_param runtime_param0 // CHECK:STDOUT: %a: %ptr.2 = bind_name a, %a.param // CHECK:STDOUT: } @@ -131,86 +151,87 @@ fn F(a: A(0)*) { // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @A(%N.loc4_9.1: %i32) { -// CHECK:STDOUT: %N.loc4_9.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc4_9.2 (constants.%N.1)] -// CHECK:STDOUT: %N.patt.loc4_9.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_9.2 (constants.%N.patt.1)] +// CHECK:STDOUT: generic class @A(%N.loc6_9.1: %i32) { +// CHECK:STDOUT: %N.loc6_9.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc6_9.2 (constants.%N.2)] +// CHECK:STDOUT: %N.patt.loc6_9.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_9.2 (constants.%N.patt.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %A: type = class_type @A, @A(%N.loc4_9.2) [symbolic = %A (constants.%A.1)] -// CHECK:STDOUT: %A.elem.loc5: type = unbound_element_type @A.%A (%A.1), %B [symbolic = %A.elem.loc5 (constants.%A.elem.1)] -// CHECK:STDOUT: %Convert.bound.loc10_19.2: = bound_method %N.loc4_9.2, constants.%Convert.13 [symbolic = %Convert.bound.loc10_19.2 (constants.%Convert.bound.1)] -// CHECK:STDOUT: %Convert.specific_fn.loc10_19.2: = specific_function %Convert.bound.loc10_19.2, @Convert.4(constants.%int_32) [symbolic = %Convert.specific_fn.loc10_19.2 (constants.%Convert.specific_fn.1)] -// CHECK:STDOUT: %int.convert_checked.loc10_19.2: init Core.IntLiteral = call %Convert.specific_fn.loc10_19.2(%N.loc4_9.2) [symbolic = %int.convert_checked.loc10_19.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %iN: type = int_type signed, %int.convert_checked.loc10_19.2 [symbolic = %iN (constants.%iN.2)] -// CHECK:STDOUT: %require_complete: = require_complete_type @A.%iN (%iN.2) [symbolic = %require_complete (constants.%require_complete.7)] -// CHECK:STDOUT: %A.elem.loc10: type = unbound_element_type @A.%A (%A.1), @A.%iN (%iN.2) [symbolic = %A.elem.loc10 (constants.%A.elem.2)] -// CHECK:STDOUT: %struct_type.base.n: type = struct_type {.base: %B, .n: @A.%iN (%iN.2)} [symbolic = %struct_type.base.n (constants.%struct_type.base.n)] -// CHECK:STDOUT: %complete_type.loc11_1.2: = complete_type_witness @A.%struct_type.base.n (%struct_type.base.n) [symbolic = %complete_type.loc11_1.2 (constants.%complete_type.3)] +// CHECK:STDOUT: %A: type = class_type @A, @A(%N.loc6_9.2) [symbolic = %A (constants.%A.1)] +// CHECK:STDOUT: %A.elem.loc7: type = unbound_element_type @A.%A (%A.1), %B [symbolic = %A.elem.loc7 (constants.%A.elem.1)] +// CHECK:STDOUT: %Convert.bound.loc12_14.2: = bound_method %N.loc6_9.2, constants.%Convert.9 [symbolic = %Convert.bound.loc12_14.2 (constants.%Convert.bound.1)] +// CHECK:STDOUT: %Convert.specific_fn.loc12_14.2: = specific_function %Convert.bound.loc12_14.2, @Convert.3(constants.%int_32) [symbolic = %Convert.specific_fn.loc12_14.2 (constants.%Convert.specific_fn.1)] +// CHECK:STDOUT: %int.convert_checked.loc12_14.2: init Core.IntLiteral = call %Convert.specific_fn.loc12_14.2(%N.loc6_9.2) [symbolic = %int.convert_checked.loc12_14.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %iN.builtin: type = int_type signed, %int.convert_checked.loc12_14.2 [symbolic = %iN.builtin (constants.%iN.builtin.2)] +// CHECK:STDOUT: %require_complete: = require_complete_type @A.%iN.builtin (%iN.builtin.2) [symbolic = %require_complete (constants.%require_complete.5)] +// CHECK:STDOUT: %A.elem.loc12: type = unbound_element_type @A.%A (%A.1), @A.%iN.builtin (%iN.builtin.2) [symbolic = %A.elem.loc12 (constants.%A.elem.2)] +// CHECK:STDOUT: %struct_type.base.n: type = struct_type {.base: %B, .n: @A.%iN.builtin (%iN.builtin.2)} [symbolic = %struct_type.base.n (constants.%struct_type.base.n)] +// CHECK:STDOUT: %complete_type.loc13_1.2: = complete_type_witness @A.%struct_type.base.n (%struct_type.base.n) [symbolic = %complete_type.loc13_1.2 (constants.%complete_type.4)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc5: @A.%A.elem.loc5 (%A.elem.1) = base_decl %B.ref, element0 [template] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%import_ref.1 [template = constants.%Int] -// CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc4_9.1 [symbolic = %N.loc4_9.2 (constants.%N.1)] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.13] -// CHECK:STDOUT: %Convert.bound.loc10_19.1: = bound_method %N.ref, %impl.elem0 [symbolic = %Convert.bound.loc10_19.2 (constants.%Convert.bound.1)] -// CHECK:STDOUT: %Convert.specific_fn.loc10_19.1: = specific_function %Convert.bound.loc10_19.1, @Convert.4(constants.%int_32) [symbolic = %Convert.specific_fn.loc10_19.2 (constants.%Convert.specific_fn.1)] -// CHECK:STDOUT: %int.convert_checked.loc10_19.1: init Core.IntLiteral = call %Convert.specific_fn.loc10_19.1(%N.ref) [symbolic = %int.convert_checked.loc10_19.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc10_19.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc10_19.1 [symbolic = %int.convert_checked.loc10_19.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc10_19.2: Core.IntLiteral = converted %N.ref, %.loc10_19.1 [symbolic = %int.convert_checked.loc10_19.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %int.make_type_signed.loc10: init type = call %Int.ref(%.loc10_19.2) [symbolic = %iN (constants.%iN.2)] -// CHECK:STDOUT: %.loc10_20.1: type = value_of_initializer %int.make_type_signed.loc10 [symbolic = %iN (constants.%iN.2)] -// CHECK:STDOUT: %.loc10_20.2: type = converted %int.make_type_signed.loc10, %.loc10_20.1 [symbolic = %iN (constants.%iN.2)] -// CHECK:STDOUT: %.loc10_8: @A.%A.elem.loc10 (%A.elem.2) = field_decl n, element1 [template] -// CHECK:STDOUT: %complete_type.loc11_1.1: = complete_type_witness %struct_type.base.n [symbolic = %complete_type.loc11_1.2 (constants.%complete_type.3)] +// CHECK:STDOUT: %.loc7: @A.%A.elem.loc7 (%A.elem.1) = base_decl %B.ref, element0 [template] +// CHECK:STDOUT: %Int.ref: %Int.type.1 = name_ref Int, file.%Int.decl [template = constants.%Int.1] +// CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc6_9.1 [symbolic = %N.loc6_9.2 (constants.%N.2)] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.9] +// CHECK:STDOUT: %Convert.bound.loc12_14.1: = bound_method %N.ref, %impl.elem0 [symbolic = %Convert.bound.loc12_14.2 (constants.%Convert.bound.1)] +// CHECK:STDOUT: %Convert.specific_fn.loc12_14.1: = specific_function %Convert.bound.loc12_14.1, @Convert.3(constants.%int_32) [symbolic = %Convert.specific_fn.loc12_14.2 (constants.%Convert.specific_fn.1)] +// CHECK:STDOUT: %int.convert_checked.loc12_14.1: init Core.IntLiteral = call %Convert.specific_fn.loc12_14.1(%N.ref) [symbolic = %int.convert_checked.loc12_14.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %.loc12_14.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc12_14.1 [symbolic = %int.convert_checked.loc12_14.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %.loc12_14.2: Core.IntLiteral = converted %N.ref, %.loc12_14.1 [symbolic = %int.convert_checked.loc12_14.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%.loc12_14.2) [symbolic = %iN.builtin (constants.%iN.builtin.2)] +// CHECK:STDOUT: %.loc12_15.1: type = value_of_initializer %int.make_type_signed [symbolic = %iN.builtin (constants.%iN.builtin.2)] +// CHECK:STDOUT: %.loc12_15.2: type = converted %int.make_type_signed, %.loc12_15.1 [symbolic = %iN.builtin (constants.%iN.builtin.2)] +// CHECK:STDOUT: %.loc12_8: @A.%A.elem.loc12 (%A.elem.2) = field_decl n, element1 [template] +// CHECK:STDOUT: %complete_type.loc13_1.1: = complete_type_witness %struct_type.base.n [symbolic = %complete_type.loc13_1.2 (constants.%complete_type.4)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A.1 -// CHECK:STDOUT: .base = %.loc5 -// CHECK:STDOUT: .n = %.loc10_8 +// CHECK:STDOUT: .base = %.loc7 +// CHECK:STDOUT: .n = %.loc12_8 // CHECK:STDOUT: extend %B.ref -// CHECK:STDOUT: complete_type_witness = %complete_type.loc11_1.1 +// CHECK:STDOUT: complete_type_witness = %complete_type.loc13_1.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: fn @Int.1(%N.param_patt: Core.IntLiteral) -> type = "int.make_type_signed"; +// CHECK:STDOUT: // CHECK:STDOUT: fn @F(%a.param_patt: %ptr.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %ptr.loc17: type = ptr_type %B [template = constants.%ptr.3] +// CHECK:STDOUT: %ptr.loc19: type = ptr_type %B [template = constants.%ptr.3] // CHECK:STDOUT: %a.ref: %ptr.2 = name_ref a, %a -// CHECK:STDOUT: %.loc17_16.1: ref %A.2 = deref %a.ref -// CHECK:STDOUT: %.loc17_16.2: ref %B = class_element_access %.loc17_16.1, element0 -// CHECK:STDOUT: %addr: %ptr.3 = addr_of %.loc17_16.2 -// CHECK:STDOUT: %.loc17_16.3: %ptr.3 = converted %a.ref, %addr -// CHECK:STDOUT: %b: %ptr.3 = bind_name b, %.loc17_16.3 +// CHECK:STDOUT: %.loc19_16.1: ref %A.2 = deref %a.ref +// CHECK:STDOUT: %.loc19_16.2: ref %B = class_element_access %.loc19_16.1, element0 +// CHECK:STDOUT: %addr: %ptr.3 = addr_of %.loc19_16.2 +// CHECK:STDOUT: %.loc19_16.3: %ptr.3 = converted %a.ref, %addr +// CHECK:STDOUT: %b: %ptr.3 = bind_name b, %.loc19_16.3 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A(constants.%N.1) { -// CHECK:STDOUT: %N.loc4_9.2 => constants.%N.1 -// CHECK:STDOUT: %N.patt.loc4_9.2 => constants.%N.1 +// CHECK:STDOUT: specific @A(constants.%N.2) { +// CHECK:STDOUT: %N.loc6_9.2 => constants.%N.2 +// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%N.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A(%N.loc4_9.2) { -// CHECK:STDOUT: %N.loc4_9.2 => constants.%N.1 -// CHECK:STDOUT: %N.patt.loc4_9.2 => constants.%N.1 +// CHECK:STDOUT: specific @A(%N.loc6_9.2) { +// CHECK:STDOUT: %N.loc6_9.2 => constants.%N.2 +// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%N.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%int_0.2) { -// CHECK:STDOUT: %N.loc4_9.2 => constants.%int_0.2 -// CHECK:STDOUT: %N.patt.loc4_9.2 => constants.%int_0.2 +// CHECK:STDOUT: %N.loc6_9.2 => constants.%int_0.2 +// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%int_0.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %A => constants.%A.2 -// CHECK:STDOUT: %A.elem.loc5 => constants.%A.elem.3 -// CHECK:STDOUT: %Convert.bound.loc10_19.2 => constants.%Convert.bound.3 -// CHECK:STDOUT: %Convert.specific_fn.loc10_19.2 => constants.%Convert.specific_fn.3 -// CHECK:STDOUT: %int.convert_checked.loc10_19.2 => constants.%int_0.1 -// CHECK:STDOUT: %iN => +// CHECK:STDOUT: %A.elem.loc7 => constants.%A.elem.3 +// CHECK:STDOUT: %Convert.bound.loc12_14.2 => constants.%Convert.bound.3 +// CHECK:STDOUT: %Convert.specific_fn.loc12_14.2 => constants.%Convert.specific_fn.3 +// CHECK:STDOUT: %int.convert_checked.loc12_14.2 => constants.%int_0.1 +// CHECK:STDOUT: %iN.builtin => // CHECK:STDOUT: %require_complete => -// CHECK:STDOUT: %A.elem.loc10 => +// CHECK:STDOUT: %A.elem.loc12 => // CHECK:STDOUT: %struct_type.base.n => -// CHECK:STDOUT: %complete_type.loc11_1.2 => +// CHECK:STDOUT: %complete_type.loc13_1.2 => // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/field.carbon b/toolchain/check/testdata/class/generic/field.carbon index 1ebf70f19f5b..d5dbf7c26a87 100644 --- a/toolchain/check/testdata/class/generic/field.carbon +++ b/toolchain/check/testdata/class/generic/field.carbon @@ -37,34 +37,33 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: %struct_type.x.1: type = struct_type {.x: %T} [symbolic] // CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x.1 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%i32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32 [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %i32.builtin [template] // CHECK:STDOUT: %Class.elem.2: type = unbound_element_type %Class.2, %i32 [template] // CHECK:STDOUT: %struct_type.x.2: type = struct_type {.x: %i32} [template] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.x.2 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.x.2 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %require_complete.2: = require_complete_type %Class.1 [symbolic] +// CHECK:STDOUT: %require_complete.3: = require_complete_type %Class.1 [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %Class.3: type = class_type @Class, @Class(%U) [symbolic] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] -// CHECK:STDOUT: %require_complete.3: = require_complete_type %U [symbolic] +// CHECK:STDOUT: %require_complete.4: = require_complete_type %U [symbolic] // CHECK:STDOUT: %Class.elem.3: type = unbound_element_type %Class.3, %U [symbolic] // CHECK:STDOUT: %struct_type.x.3: type = struct_type {.x: %U} [symbolic] -// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.x.3 [symbolic] -// CHECK:STDOUT: %require_complete.4: = require_complete_type %Class.3 [symbolic] +// CHECK:STDOUT: %complete_type.5: = complete_type_witness %struct_type.x.3 [symbolic] +// CHECK:STDOUT: %require_complete.5: = require_complete_type %Class.3 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -94,14 +93,10 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] // CHECK:STDOUT: %int_32.loc15_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc15_15: init type = call constants.%Int(%int_32.loc15_15) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_18.1: type = value_of_initializer %int.make_type_signed.loc15_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_18.2: type = converted %int.make_type_signed.loc15_15, %.loc15_18.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc15_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.2] // CHECK:STDOUT: %int_32.loc15_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc15_24: init type = call constants.%Int(%int_32.loc15_24) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_24.1: type = value_of_initializer %int.make_type_signed.loc15_24 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_24.2: type = converted %int.make_type_signed.loc15_24, %.loc15_24.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc15_24: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %c.param: %Class.2 = value_param runtime_param0 // CHECK:STDOUT: %c: %Class.2 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -185,7 +180,7 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: %Class.loc19_26.2: type = class_type @Class, @Class(%T.loc19_6.2) [symbolic = %Class.loc19_26.2 (constants.%Class.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc19: = require_complete_type @G.%Class.loc19_26.2 (%Class.1) [symbolic = %require_complete.loc19 (constants.%require_complete.2)] +// CHECK:STDOUT: %require_complete.loc19: = require_complete_type @G.%Class.loc19_26.2 (%Class.1) [symbolic = %require_complete.loc19 (constants.%require_complete.3)] // CHECK:STDOUT: %Class.elem: type = unbound_element_type @G.%Class.loc19_26.2 (%Class.1), @G.%T.loc19_6.2 (%T) [symbolic = %Class.elem (constants.%Class.elem.1)] // CHECK:STDOUT: %require_complete.loc20: = require_complete_type @G.%T.loc19_6.2 (%T) [symbolic = %require_complete.loc20 (constants.%require_complete.1)] // CHECK:STDOUT: @@ -205,8 +200,8 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: %Class.loc23_26.2: type = class_type @Class, @Class(%U.loc23_6.2) [symbolic = %Class.loc23_26.2 (constants.%Class.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc23_29: = require_complete_type @H.%U.loc23_6.2 (%U) [symbolic = %require_complete.loc23_29 (constants.%require_complete.3)] -// CHECK:STDOUT: %require_complete.loc23_17: = require_complete_type @H.%Class.loc23_26.2 (%Class.3) [symbolic = %require_complete.loc23_17 (constants.%require_complete.4)] +// CHECK:STDOUT: %require_complete.loc23_29: = require_complete_type @H.%U.loc23_6.2 (%U) [symbolic = %require_complete.loc23_29 (constants.%require_complete.4)] +// CHECK:STDOUT: %require_complete.loc23_17: = require_complete_type @H.%Class.loc23_26.2 (%Class.3) [symbolic = %require_complete.loc23_17 (constants.%require_complete.5)] // CHECK:STDOUT: %Class.elem: type = unbound_element_type @H.%Class.loc23_26.2 (%Class.3), @H.%U.loc23_6.2 (%U) [symbolic = %Class.elem (constants.%Class.elem.3)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%U.param_patt: type, %c.param_patt: @H.%Class.loc23_26.2 (%Class.3)) -> @H.%U.loc23_6.2 (%U) { @@ -241,11 +236,11 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: %T.patt.loc11_13.2 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%complete_type.2 +// CHECK:STDOUT: %require_complete => constants.%complete_type.3 // CHECK:STDOUT: %Class => constants.%Class.2 // CHECK:STDOUT: %Class.elem => constants.%Class.elem.2 // CHECK:STDOUT: %struct_type.x => constants.%struct_type.x.2 -// CHECK:STDOUT: %complete_type.loc13_1.2 => constants.%complete_type.3 +// CHECK:STDOUT: %complete_type.loc13_1.2 => constants.%complete_type.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(@G.%T.loc19_6.2) { @@ -264,11 +259,11 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: %T.patt.loc11_13.2 => constants.%U // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%require_complete.3 +// CHECK:STDOUT: %require_complete => constants.%require_complete.4 // CHECK:STDOUT: %Class => constants.%Class.3 // CHECK:STDOUT: %Class.elem => constants.%Class.elem.3 // CHECK:STDOUT: %struct_type.x => constants.%struct_type.x.3 -// CHECK:STDOUT: %complete_type.loc13_1.2 => constants.%complete_type.4 +// CHECK:STDOUT: %complete_type.loc13_1.2 => constants.%complete_type.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(@H.%U.loc23_6.2) { diff --git a/toolchain/check/testdata/class/generic/import.carbon b/toolchain/check/testdata/class/generic/import.carbon index 27d0e3273086..c174a35d87bd 100644 --- a/toolchain/check/testdata/class/generic/import.carbon +++ b/toolchain/check/testdata/class/generic/import.carbon @@ -95,20 +95,18 @@ class Class(U:! type) { // CHECK:STDOUT: %CompleteClass.generic: %CompleteClass.type = struct_value () [template] // CHECK:STDOUT: %CompleteClass.1: type = class_type @CompleteClass, @CompleteClass(%T) [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %CompleteClass.elem: type = unbound_element_type %CompleteClass.1, %i32 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @CompleteClass(%T) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] // CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.n [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.n [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%i32) [template] @@ -119,7 +117,7 @@ class Class(U:! type) { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -153,9 +151,7 @@ class Class(U:! type) { // CHECK:STDOUT: } { // CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, file.%CompleteClass.decl [template = constants.%CompleteClass.generic] // 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_28.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_28.2: type = converted %int.make_type_signed, %.loc11_28.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.2] // CHECK:STDOUT: %return.param: ref %CompleteClass.2 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %CompleteClass.2 = return_slot %return.param @@ -181,26 +177,22 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: class { // 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: %.loc7_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc7_10.2: type = converted %int.make_type_signed, %.loc7_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8: @CompleteClass.%CompleteClass.elem (%CompleteClass.elem) = field_decl n, element0 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc7: @CompleteClass.%CompleteClass.elem (%CompleteClass.elem) = field_decl n, element0 [template] // CHECK:STDOUT: %F.decl: @CompleteClass.%F.type (%F.type.1) = fn_decl @F.1 [symbolic = @CompleteClass.%F (constants.%F.1)] { // 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: %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: %.loc8_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_13.2: type = converted %int.make_type_signed, %.loc8_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [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: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%CompleteClass.1 -// CHECK:STDOUT: .n = %.loc7_8 +// CHECK:STDOUT: .n = %.loc7 // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } @@ -212,7 +204,7 @@ class Class(U:! type) { // CHECK:STDOUT: fn() -> %i32 { // CHECK:STDOUT: !entry: // 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: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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] @@ -255,27 +247,25 @@ class Class(U:! type) { // CHECK:STDOUT: --- foo.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic] -// CHECK:STDOUT: %require_complete.7: = require_complete_type %T [symbolic] +// CHECK:STDOUT: %require_complete.5: = require_complete_type %T [symbolic] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T [symbolic] // CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %T} [symbolic] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x [symbolic] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.x [symbolic] // CHECK:STDOUT: %CompleteClass.type: type = generic_class_type @CompleteClass [template] // CHECK:STDOUT: %CompleteClass.generic: %CompleteClass.type = struct_value () [template] -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %struct_type.n.1: type = struct_type {.n: %i32} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.n.1 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.n.1 [template] // CHECK:STDOUT: %CompleteClass.1: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic] // CHECK:STDOUT: %CompleteClass.elem.1: type = unbound_element_type %CompleteClass.1, %i32 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @CompleteClass(%T) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %Int.type: type = fn_type @Int [template] -// CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%i32) [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] @@ -284,11 +274,11 @@ class Class(U:! type) { // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %struct_type.n.2: type = struct_type {.n: Core.IntLiteral} [template] -// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.1, @ImplicitAs(%i32) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %CompleteClass.val: %CompleteClass.2 = struct_value (%int_1.2) [template] @@ -297,15 +287,15 @@ class Class(U:! type) { // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.2: %CompleteClass.type = import_ref Main//foo, CompleteClass, loaded [template = constants.%CompleteClass.generic] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref.42 -// CHECK:STDOUT: .ImplicitAs = %import_ref.43 +// CHECK:STDOUT: .Int = %import_ref.197 +// CHECK:STDOUT: .ImplicitAs = %import_ref.198 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.38: = import_ref Main//foo, loc9_1, loaded [template = constants.%complete_type.2] -// CHECK:STDOUT: %import_ref.39 = import_ref Main//foo, inst37 [no loc], unloaded -// CHECK:STDOUT: %import_ref.40 = import_ref Main//foo, loc7_8, unloaded -// CHECK:STDOUT: %import_ref.41 = import_ref Main//foo, loc8_17, unloaded +// CHECK:STDOUT: %import_ref.193: = import_ref Main//foo, loc9_1, loaded [template = constants.%complete_type.4] +// CHECK:STDOUT: %import_ref.194 = import_ref Main//foo, inst37 [no loc], unloaded +// CHECK:STDOUT: %import_ref.195 = import_ref Main//foo, loc7_8, unloaded +// CHECK:STDOUT: %import_ref.196 = import_ref Main//foo, loc8_17, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -331,9 +321,7 @@ class Class(U:! type) { // CHECK:STDOUT: } { // CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%import_ref.2 [template = constants.%CompleteClass.generic] // 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: %.loc8_28.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_28.2: type = converted %int.make_type_signed, %.loc8_28.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.2] // CHECK:STDOUT: %return.param: ref %CompleteClass.2 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %CompleteClass.2 = return_slot %return.param @@ -345,16 +333,16 @@ class Class(U:! type) { // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.1 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type @Class.%T.1 (%T) [symbolic = %require_complete (constants.%require_complete.7)] +// CHECK:STDOUT: %require_complete: = require_complete_type @Class.%T.1 (%T) [symbolic = %require_complete (constants.%require_complete.5)] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.1) [symbolic = %Class (constants.%Class)] // CHECK:STDOUT: %Class.elem: type = unbound_element_type @Class.%Class (%Class), @Class.%T.1 (%T) [symbolic = %Class.elem (constants.%Class.elem)] // CHECK:STDOUT: %struct_type.x: type = struct_type {.x: @Class.%T.1 (%T)} [symbolic = %struct_type.x (constants.%struct_type.x)] -// CHECK:STDOUT: %complete_type.loc6_1.2: = complete_type_witness @Class.%struct_type.x (%struct_type.x) [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] +// CHECK:STDOUT: %complete_type.loc6_1.2: = complete_type_witness @Class.%struct_type.x (%struct_type.x) [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.3)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: %.loc5: @Class.%Class.elem (%Class.elem) = field_decl x, element0 [template] -// CHECK:STDOUT: %complete_type.loc6_1.1: = complete_type_witness %struct_type.x [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] +// CHECK:STDOUT: %complete_type.loc6_1.1: = complete_type_witness %struct_type.x [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -375,10 +363,10 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.39 -// CHECK:STDOUT: .n = imports.%import_ref.40 -// CHECK:STDOUT: .F = imports.%import_ref.41 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.38 +// CHECK:STDOUT: .Self = imports.%import_ref.194 +// CHECK:STDOUT: .n = imports.%import_ref.195 +// CHECK:STDOUT: .F = imports.%import_ref.196 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.193 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -392,7 +380,7 @@ class Class(U:! type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc9_17.1: %struct_type.n.2 = struct_literal (%int_1) -// CHECK:STDOUT: %impl.elem0: %Convert.type.13 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.9 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_1) [template = constants.%int_1.2] @@ -447,15 +435,13 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %UseMethod.type: type = fn_type @UseMethod [template] // CHECK:STDOUT: %UseMethod: %UseMethod.type = struct_value () [template] // CHECK:STDOUT: %CompleteClass.type: type = generic_class_type @CompleteClass [template] // CHECK:STDOUT: %CompleteClass.generic: %CompleteClass.type = struct_value () [template] // CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.n [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %CompleteClass.1: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] @@ -482,10 +468,10 @@ class Class(U:! type) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: = import_ref Main//foo, loc9_1, loaded [template = constants.%complete_type] -// CHECK:STDOUT: %import_ref.6 = import_ref Main//foo, inst37 [no loc], unloaded -// CHECK:STDOUT: %import_ref.7: @CompleteClass.%CompleteClass.elem (%CompleteClass.elem.1) = import_ref Main//foo, loc7_8, loaded [template = %.1] -// CHECK:STDOUT: %import_ref.8: @CompleteClass.%F.type (%F.type.1) = import_ref Main//foo, loc8_17, loaded [symbolic = @CompleteClass.%F (constants.%F.1)] +// CHECK:STDOUT: %import_ref.8: = import_ref Main//foo, loc9_1, loaded [template = constants.%complete_type.3] +// CHECK:STDOUT: %import_ref.9 = import_ref Main//foo, inst37 [no loc], unloaded +// CHECK:STDOUT: %import_ref.10: @CompleteClass.%CompleteClass.elem (%CompleteClass.elem.1) = import_ref Main//foo, loc7_8, loaded [template = %.1] +// CHECK:STDOUT: %import_ref.11: @CompleteClass.%F.type (%F.type.1) = import_ref Main//foo, loc8_17, loaded [symbolic = @CompleteClass.%F (constants.%F.1)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -504,9 +490,7 @@ class Class(U:! type) { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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_19.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.2: type = converted %int.make_type_signed.loc5, %.loc5_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -515,9 +499,7 @@ class Class(U:! type) { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc10: init type = call constants.%Int(%int_32.loc10) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_18.1: type = value_of_initializer %int.make_type_signed.loc10 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_18.2: type = converted %int.make_type_signed.loc10, %.loc10_18.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -535,10 +517,10 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.6 -// CHECK:STDOUT: .n = imports.%import_ref.7 -// CHECK:STDOUT: .F = imports.%import_ref.8 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.5 +// CHECK:STDOUT: .Self = imports.%import_ref.9 +// CHECK:STDOUT: .n = imports.%import_ref.10 +// CHECK:STDOUT: .F = imports.%import_ref.11 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.8 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -546,18 +528,16 @@ class Class(U:! type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%import_ref.2 [template = constants.%CompleteClass.generic] // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_27.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_27.2: type = converted %int.make_type_signed.loc6, %.loc6_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.2] // CHECK:STDOUT: %v.var: ref %CompleteClass.2 = var v // CHECK:STDOUT: %v: ref %CompleteClass.2 = bind_name v, %v.var // CHECK:STDOUT: %F.ref.loc6: %F.type.3 = name_ref F, imports.%import_ref.3 [template = constants.%F.3] -// CHECK:STDOUT: %.loc6_7: ref %CompleteClass.2 = splice_block %v.var {} -// CHECK:STDOUT: %F.call.loc6: init %CompleteClass.2 = call %F.ref.loc6() to %.loc6_7 +// CHECK:STDOUT: %.loc6: ref %CompleteClass.2 = splice_block %v.var {} +// CHECK:STDOUT: %F.call.loc6: init %CompleteClass.2 = call %F.ref.loc6() to %.loc6 // CHECK:STDOUT: assign %v.var, %F.call.loc6 // CHECK:STDOUT: %v.ref: ref %CompleteClass.2 = name_ref v, %v -// CHECK:STDOUT: %.loc7_11: %F.type.2 = specific_constant imports.%import_ref.8, @CompleteClass(constants.%i32) [template = constants.%F.2] +// CHECK:STDOUT: %.loc7_11: %F.type.2 = specific_constant imports.%import_ref.11, @CompleteClass(constants.%i32) [template = constants.%F.2] // CHECK:STDOUT: %F.ref.loc7: %F.type.2 = name_ref F, %.loc7_11 [template = constants.%F.2] // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref.loc7, @F.1(constants.%i32) [template = constants.%F.specific_fn] // CHECK:STDOUT: %F.call.loc7: init %i32 = call %F.specific_fn() @@ -578,18 +558,16 @@ class Class(U:! type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%import_ref.2 [template = constants.%CompleteClass.generic] // 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_27.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_27.2: type = converted %int.make_type_signed.loc11, %.loc11_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.2] // CHECK:STDOUT: %v.var: ref %CompleteClass.2 = var v // CHECK:STDOUT: %v: ref %CompleteClass.2 = bind_name v, %v.var // CHECK:STDOUT: %F.ref: %F.type.3 = name_ref F, imports.%import_ref.3 [template = constants.%F.3] -// CHECK:STDOUT: %.loc11_7: ref %CompleteClass.2 = splice_block %v.var {} -// CHECK:STDOUT: %F.call: init %CompleteClass.2 = call %F.ref() to %.loc11_7 +// CHECK:STDOUT: %.loc11: ref %CompleteClass.2 = splice_block %v.var {} +// CHECK:STDOUT: %F.call: init %CompleteClass.2 = call %F.ref() to %.loc11 // CHECK:STDOUT: assign %v.var, %F.call // CHECK:STDOUT: %v.ref: ref %CompleteClass.2 = name_ref v, %v -// CHECK:STDOUT: %n.ref: %CompleteClass.elem.2 = name_ref n, imports.%import_ref.7 [template = imports.%.1] +// CHECK:STDOUT: %n.ref: %CompleteClass.elem.2 = name_ref n, imports.%import_ref.10 [template = imports.%.1] // CHECK:STDOUT: %.loc12_11.1: ref %i32 = class_element_access %v.ref, element0 // CHECK:STDOUT: %.loc12_11.2: %i32 = bind_value %.loc12_11.1 // CHECK:STDOUT: return %.loc12_11.2 @@ -636,17 +614,15 @@ class Class(U:! type) { // CHECK:STDOUT: %CompleteClass.type: type = generic_class_type @CompleteClass [template] // CHECK:STDOUT: %CompleteClass.generic: %CompleteClass.type = struct_value () [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.n [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %CompleteClass.1: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %CompleteClass.elem.1: type = unbound_element_type %CompleteClass.1, %i32 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @CompleteClass(%T) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %Int.type: type = fn_type @Int [template] -// CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %ptr.1: type = ptr_type %i32 [template] // CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%ptr.1) [template] // CHECK:STDOUT: %CompleteClass.elem.2: type = unbound_element_type %CompleteClass.2, %i32 [template] @@ -665,15 +641,15 @@ class Class(U:! type) { // CHECK:STDOUT: %import_ref.2: %CompleteClass.type = import_ref Main//foo, CompleteClass, loaded [template = constants.%CompleteClass.generic] // CHECK:STDOUT: %import_ref.3: %F.type.3 = import_ref Main//foo, F, loaded [template = constants.%F.3] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref.8 -// CHECK:STDOUT: .ImplicitAs = %import_ref.9 +// CHECK:STDOUT: .Int = %import_ref.11 +// CHECK:STDOUT: .ImplicitAs = %import_ref.12 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.4: = import_ref Main//foo, loc9_1, loaded [template = constants.%complete_type] -// CHECK:STDOUT: %import_ref.5 = import_ref Main//foo, inst37 [no loc], unloaded -// CHECK:STDOUT: %import_ref.6 = import_ref Main//foo, loc7_8, unloaded -// CHECK:STDOUT: %import_ref.7 = import_ref Main//foo, loc8_17, unloaded +// CHECK:STDOUT: %import_ref.7: = import_ref Main//foo, loc9_1, loaded [template = constants.%complete_type.2] +// CHECK:STDOUT: %import_ref.8 = import_ref Main//foo, inst37 [no loc], unloaded +// CHECK:STDOUT: %import_ref.9 = import_ref Main//foo, loc7_8, unloaded +// CHECK:STDOUT: %import_ref.10 = import_ref Main//foo, loc8_17, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -701,10 +677,10 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.5 -// CHECK:STDOUT: .n = imports.%import_ref.6 -// CHECK:STDOUT: .F = imports.%import_ref.7 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.4 +// CHECK:STDOUT: .Self = imports.%import_ref.8 +// CHECK:STDOUT: .n = imports.%import_ref.9 +// CHECK:STDOUT: .F = imports.%import_ref.10 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.7 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -712,9 +688,7 @@ class Class(U:! type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%import_ref.2 [template = constants.%CompleteClass.generic] // 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: %.loc14_27.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_27.2: type = converted %int.make_type_signed, %.loc14_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr.1] // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%ptr.1) [template = constants.%CompleteClass.2] // CHECK:STDOUT: %v.var: ref %CompleteClass.2 = var v diff --git a/toolchain/check/testdata/class/generic/init.carbon b/toolchain/check/testdata/class/generic/init.carbon index bdfea5f7833f..4867fa4d679f 100644 --- a/toolchain/check/testdata/class/generic/init.carbon +++ b/toolchain/check/testdata/class/generic/init.carbon @@ -58,21 +58,20 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %InitFromStructGeneric: %InitFromStructGeneric.type = struct_value () [template] // CHECK:STDOUT: %require_complete.2: = require_complete_type %Class.1 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %InitFromStructSpecific.type: type = fn_type @InitFromStructSpecific [template] // CHECK:STDOUT: %InitFromStructSpecific: %InitFromStructSpecific.type = struct_value () [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %i32.builtin [template] // CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%i32) [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32 [template] // CHECK:STDOUT: %Class.elem.2: type = unbound_element_type %Class.2, %i32 [template] // CHECK:STDOUT: %struct_type.k.2: type = struct_type {.k: %i32} [template] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.k.2 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.k.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -117,13 +116,9 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc13_30: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_30: init type = call constants.%Int(%int_32.loc13_30) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_30.1: type = value_of_initializer %int.make_type_signed.loc13_30 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_30.2: type = converted %int.make_type_signed.loc13_30, %.loc13_30.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_30: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_38: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_38: init type = call constants.%Int(%int_32.loc13_38) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_38.1: type = value_of_initializer %int.make_type_signed.loc13_38 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_38.2: type = converted %int.make_type_signed.loc13_38, %.loc13_38.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_38: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %x.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %x: %i32 = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -191,9 +186,7 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] // CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%int_32.loc14) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_19.1: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_19.2: type = converted %int.make_type_signed.loc14, %.loc14_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.2] // CHECK:STDOUT: %v.var: ref %Class.2 = var v // CHECK:STDOUT: %v: ref %Class.2 = bind_name v, %v.var @@ -243,11 +236,11 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%complete_type.2 +// CHECK:STDOUT: %require_complete => constants.%complete_type.3 // CHECK:STDOUT: %Class => constants.%Class.2 // CHECK:STDOUT: %Class.elem => constants.%Class.elem.2 // CHECK:STDOUT: %struct_type.k => constants.%struct_type.k.2 -// CHECK:STDOUT: %complete_type.loc6_1.2 => constants.%complete_type.3 +// CHECK:STDOUT: %complete_type.loc6_1.2 => constants.%complete_type.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- adapt.carbon @@ -264,18 +257,18 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %InitFromAdaptedGeneric: %InitFromAdaptedGeneric.type = struct_value () [template] // CHECK:STDOUT: %require_complete.2: = require_complete_type %Adapt.1 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %InitFromAdaptedSpecific.type: type = fn_type @InitFromAdaptedSpecific [template] // CHECK:STDOUT: %InitFromAdaptedSpecific: %InitFromAdaptedSpecific.type = struct_value () [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %i32.builtin [template] // CHECK:STDOUT: %Adapt.2: type = class_type @Adapt, @Adapt(%i32) [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -320,13 +313,9 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc12_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc12_31: init type = call constants.%Int(%int_32.loc12_31) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_31.1: type = value_of_initializer %int.make_type_signed.loc12_31 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_31.2: type = converted %int.make_type_signed.loc12_31, %.loc12_31.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12_31: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc12_39: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc12_39: init type = call constants.%Int(%int_32.loc12_39) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_39.1: type = value_of_initializer %int.make_type_signed.loc12_39 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_39.2: type = converted %int.make_type_signed.loc12_39, %.loc12_39.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12_39: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %x.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %x: %i32 = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -382,16 +371,12 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %x.ref: %i32 = name_ref x, %x // CHECK:STDOUT: %Adapt.ref: %Adapt.type = name_ref Adapt, file.%Adapt.decl [template = constants.%Adapt.generic] // CHECK:STDOUT: %int_32.loc13_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_22: init type = call constants.%Int(%int_32.loc13_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_25.1: type = value_of_initializer %int.make_type_signed.loc13_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_25.2: type = converted %int.make_type_signed.loc13_22, %.loc13_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %Adapt: type = class_type @Adapt, @Adapt(constants.%i32) [template = constants.%Adapt.2] // CHECK:STDOUT: %.loc13_13.1: %Adapt.2 = as_compatible %x.ref // CHECK:STDOUT: %.loc13_13.2: %Adapt.2 = converted %x.ref, %.loc13_13.1 // CHECK:STDOUT: %int_32.loc13_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_31: init type = call constants.%Int(%int_32.loc13_31) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %int.make_type_signed.loc13_31 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.2: type = converted %int.make_type_signed.loc13_31, %.loc13_31.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_31: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc13_28.1: %i32 = as_compatible %.loc13_13.2 // CHECK:STDOUT: %.loc13_28.2: %i32 = converted %.loc13_13.2, %.loc13_28.1 // CHECK:STDOUT: return %.loc13_28.2 @@ -421,7 +406,7 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%complete_type.2 -// CHECK:STDOUT: %complete_type.loc6_1.2 => constants.%complete_type.2 +// CHECK:STDOUT: %require_complete => constants.%complete_type.3 +// CHECK:STDOUT: %complete_type.loc6_1.2 => constants.%complete_type.4 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/member_access.carbon b/toolchain/check/testdata/class/generic/member_access.carbon index 34d75357ab9a..de070de3df3b 100644 --- a/toolchain/check/testdata/class/generic/member_access.carbon +++ b/toolchain/check/testdata/class/generic/member_access.carbon @@ -70,33 +70,32 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %require_complete.3: = require_complete_type %ptr.2 [symbolic] // CHECK:STDOUT: %require_complete.4: = require_complete_type %ptr.1 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%i32) [template] // CHECK:STDOUT: %DirectFieldAccess.type: type = fn_type @DirectFieldAccess [template] // CHECK:STDOUT: %DirectFieldAccess: %DirectFieldAccess.type = struct_value () [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32 [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %i32.builtin [template] // CHECK:STDOUT: %Class.elem.2: type = unbound_element_type %Class.2, %i32 [template] // CHECK:STDOUT: %Get.type.2: type = fn_type @Get, @Class(%i32) [template] // CHECK:STDOUT: %Get.2: %Get.type.2 = struct_value () [template] // CHECK:STDOUT: %GetAddr.type.2: type = fn_type @GetAddr, @Class(%i32) [template] // CHECK:STDOUT: %GetAddr.2: %GetAddr.type.2 = struct_value () [template] // CHECK:STDOUT: %struct_type.x.2: type = struct_type {.x: %i32} [template] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.x.2 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.x.2 [template] // CHECK:STDOUT: %MethodCall.type: type = fn_type @MethodCall [template] // CHECK:STDOUT: %MethodCall: %MethodCall.type = struct_value () [template] // CHECK:STDOUT: %ptr.5: type = ptr_type %Class.2 [template] // CHECK:STDOUT: %AddrMethodCall.type: type = fn_type @AddrMethodCall [template] // CHECK:STDOUT: %AddrMethodCall: %AddrMethodCall.type = struct_value () [template] // CHECK:STDOUT: %ptr.6: type = ptr_type %i32 [template] -// CHECK:STDOUT: %complete_type.4: = complete_type_witness %ptr.6 [template] -// CHECK:STDOUT: %complete_type.5: = complete_type_witness %ptr.5 [template] +// CHECK:STDOUT: %complete_type.5: = complete_type_witness %ptr.6 [template] +// CHECK:STDOUT: %complete_type.6: = complete_type_witness %ptr.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -126,14 +125,10 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] // CHECK:STDOUT: %int_32.loc10_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc10_31: init type = call constants.%Int(%int_32.loc10_31) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_34.1: type = value_of_initializer %int.make_type_signed.loc10_31 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_34.2: type = converted %int.make_type_signed.loc10_31, %.loc10_34.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc10_31: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.2] // CHECK:STDOUT: %int_32.loc10_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc10_40: init type = call constants.%Int(%int_32.loc10_40) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_40.1: type = value_of_initializer %int.make_type_signed.loc10_40 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_40.2: type = converted %int.make_type_signed.loc10_40, %.loc10_40.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc10_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %x.param: %Class.2 = value_param runtime_param0 // CHECK:STDOUT: %x: %Class.2 = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -147,14 +142,10 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] // 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_27.1: type = value_of_initializer %int.make_type_signed.loc14_24 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_27.2: type = converted %int.make_type_signed.loc14_24, %.loc14_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_24: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.2] // CHECK:STDOUT: %int_32.loc14_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_33: init type = call constants.%Int(%int_32.loc14_33) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_33.1: type = value_of_initializer %int.make_type_signed.loc14_33 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_33.2: type = converted %int.make_type_signed.loc14_33, %.loc14_33.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %x.param: %Class.2 = value_param runtime_param0 // CHECK:STDOUT: %x: %Class.2 = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -168,15 +159,11 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] // CHECK:STDOUT: %int_32.loc18_28: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc18_28: init type = call constants.%Int(%int_32.loc18_28) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_31.1: type = value_of_initializer %int.make_type_signed.loc18_28 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_31.2: type = converted %int.make_type_signed.loc18_28, %.loc18_31.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc18_28: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.2] // CHECK:STDOUT: %ptr: type = ptr_type %Class.2 [template = constants.%ptr.5] // CHECK:STDOUT: %int_32.loc18_38: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc18_38: init type = call constants.%Int(%int_32.loc18_38) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_38.1: type = value_of_initializer %int.make_type_signed.loc18_38 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_38.2: type = converted %int.make_type_signed.loc18_38, %.loc18_38.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc18_38: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %p.param: %ptr.5 = value_param runtime_param0 // CHECK:STDOUT: %p: %ptr.5 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -373,7 +360,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %T.patt.loc2_13.2 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%complete_type.2 +// CHECK:STDOUT: %require_complete => constants.%complete_type.3 // CHECK:STDOUT: %Class => constants.%Class.2 // CHECK:STDOUT: %Class.elem => constants.%Class.elem.2 // CHECK:STDOUT: %Get.type => constants.%Get.type.2 @@ -381,7 +368,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %GetAddr.type => constants.%GetAddr.type.2 // CHECK:STDOUT: %GetAddr => constants.%GetAddr.2 // CHECK:STDOUT: %struct_type.x => constants.%struct_type.x.2 -// CHECK:STDOUT: %complete_type.loc8_1.2 => constants.%complete_type.3 +// CHECK:STDOUT: %complete_type.loc8_1.2 => constants.%complete_type.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Get(constants.%i32) { @@ -389,9 +376,9 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %Class => constants.%Class.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc5_14 => constants.%complete_type.3 +// CHECK:STDOUT: %require_complete.loc5_14 => constants.%complete_type.4 // CHECK:STDOUT: %Class.elem => constants.%Class.elem.2 -// CHECK:STDOUT: %require_complete.loc5_42 => constants.%complete_type.2 +// CHECK:STDOUT: %require_complete.loc5_42 => constants.%complete_type.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @GetAddr(constants.%i32) { @@ -401,9 +388,9 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %ptr.loc7_38.1 => constants.%ptr.6 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc7_34 => constants.%complete_type.4 -// CHECK:STDOUT: %require_complete.loc7_23 => constants.%complete_type.5 -// CHECK:STDOUT: %require_complete.loc7_54 => constants.%complete_type.3 +// CHECK:STDOUT: %require_complete.loc7_34 => constants.%complete_type.5 +// CHECK:STDOUT: %require_complete.loc7_23 => constants.%complete_type.6 +// CHECK:STDOUT: %require_complete.loc7_54 => constants.%complete_type.4 // CHECK:STDOUT: %Class.elem => constants.%Class.elem.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/member_lookup.carbon b/toolchain/check/testdata/class/generic/member_lookup.carbon index aef2efd7d140..1b5eb73d3027 100644 --- a/toolchain/check/testdata/class/generic/member_lookup.carbon +++ b/toolchain/check/testdata/class/generic/member_lookup.carbon @@ -95,26 +95,25 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %AccessBase.type: type = fn_type @AccessBase [template] // CHECK:STDOUT: %AccessBase: %AccessBase.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Derived.2: type = class_type @Derived, @Derived(%i32) [template] // CHECK:STDOUT: %AccessConcrete.type: type = fn_type @AccessConcrete [template] // CHECK:STDOUT: %AccessConcrete: %AccessConcrete.type = struct_value () [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %i32.builtin [template] // CHECK:STDOUT: %Base.2: type = class_type @Base, @Base(%i32) [template] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %i32 [template] // CHECK:STDOUT: %Base.elem.2: type = unbound_element_type %Base.2, %i32 [template] // CHECK:STDOUT: %struct_type.b.2: type = struct_type {.b: %i32} [template] -// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.b.2 [template] +// CHECK:STDOUT: %complete_type.5: = complete_type_witness %struct_type.b.2 [template] // CHECK:STDOUT: %Derived.elem.3: type = unbound_element_type %Derived.2, %Base.2 [template] // CHECK:STDOUT: %Derived.elem.4: type = unbound_element_type %Derived.2, %i32 [template] // CHECK:STDOUT: %struct_type.base.d.3: type = struct_type {.base: %Base.2, .d: %i32} [template] -// CHECK:STDOUT: %complete_type.5: = complete_type_witness %struct_type.base.d.3 [template] +// CHECK:STDOUT: %complete_type.6: = complete_type_witness %struct_type.base.d.3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -190,14 +189,10 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: %Derived.type = name_ref Derived, file.%Derived.decl [template = constants.%Derived.generic] // CHECK:STDOUT: %int_32.loc21_30: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21_30: init type = call constants.%Int(%int_32.loc21_30) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_33.1: type = value_of_initializer %int.make_type_signed.loc21_30 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_33.2: type = converted %int.make_type_signed.loc21_30, %.loc21_33.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc21_30: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %Derived: type = class_type @Derived, @Derived(constants.%i32) [template = constants.%Derived.2] // CHECK:STDOUT: %int_32.loc21_39: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21_39: init type = call constants.%Int(%int_32.loc21_39) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_39.1: type = value_of_initializer %int.make_type_signed.loc21_39 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_39.2: type = converted %int.make_type_signed.loc21_39, %.loc21_39.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc21_39: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %x.param: %Derived.2 = value_param runtime_param0 // CHECK:STDOUT: %x: %Derived.2 = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -390,13 +385,13 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Base.loc9_22.2 => constants.%Base.2 -// CHECK:STDOUT: %require_complete.loc9 => constants.%complete_type.4 +// CHECK:STDOUT: %require_complete.loc9 => constants.%complete_type.5 // CHECK:STDOUT: %Derived => constants.%Derived.2 // CHECK:STDOUT: %Derived.elem.loc9 => constants.%Derived.elem.3 -// CHECK:STDOUT: %require_complete.loc10 => constants.%complete_type.3 +// CHECK:STDOUT: %require_complete.loc10 => constants.%complete_type.4 // CHECK:STDOUT: %Derived.elem.loc10 => constants.%Derived.elem.4 // CHECK:STDOUT: %struct_type.base.d => constants.%struct_type.base.d.3 -// CHECK:STDOUT: %complete_type.loc11_1.2 => constants.%complete_type.5 +// CHECK:STDOUT: %complete_type.loc11_1.2 => constants.%complete_type.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Base(constants.%i32) { @@ -404,11 +399,11 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %T.patt.loc4_17.2 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%complete_type.3 +// CHECK:STDOUT: %require_complete => constants.%complete_type.4 // CHECK:STDOUT: %Base => constants.%Base.2 // CHECK:STDOUT: %Base.elem => constants.%Base.elem.2 // CHECK:STDOUT: %struct_type.b => constants.%struct_type.b.2 -// CHECK:STDOUT: %complete_type.loc6_1.2 => constants.%complete_type.4 +// CHECK:STDOUT: %complete_type.loc6_1.2 => constants.%complete_type.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_no_member.carbon @@ -437,26 +432,25 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %AccessMissingDerived: %AccessMissingDerived.type = struct_value () [template] // CHECK:STDOUT: %require_complete.3: = require_complete_type %Derived.1 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Derived.2: type = class_type @Derived, @Derived(%i32) [template] // CHECK:STDOUT: %AccessMissingConcrete.type: type = fn_type @AccessMissingConcrete [template] // CHECK:STDOUT: %AccessMissingConcrete: %AccessMissingConcrete.type = struct_value () [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %i32.builtin [template] // CHECK:STDOUT: %Base.2: type = class_type @Base, @Base(%i32) [template] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %i32 [template] // CHECK:STDOUT: %Base.elem.2: type = unbound_element_type %Base.2, %i32 [template] // CHECK:STDOUT: %struct_type.b.2: type = struct_type {.b: %i32} [template] -// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.b.2 [template] +// CHECK:STDOUT: %complete_type.5: = complete_type_witness %struct_type.b.2 [template] // CHECK:STDOUT: %Derived.elem.3: type = unbound_element_type %Derived.2, %Base.2 [template] // CHECK:STDOUT: %Derived.elem.4: type = unbound_element_type %Derived.2, %i32 [template] // CHECK:STDOUT: %struct_type.base.d.3: type = struct_type {.base: %Base.2, .d: %i32} [template] -// CHECK:STDOUT: %complete_type.5: = complete_type_witness %struct_type.base.d.3 [template] +// CHECK:STDOUT: %complete_type.6: = complete_type_witness %struct_type.base.d.3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -532,14 +526,10 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: %Derived.type = name_ref Derived, file.%Derived.decl [template = constants.%Derived.generic] // CHECK:STDOUT: %int_32.loc29_37: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc29_37: init type = call constants.%Int(%int_32.loc29_37) [template = constants.%i32] -// CHECK:STDOUT: %.loc29_40.1: type = value_of_initializer %int.make_type_signed.loc29_37 [template = constants.%i32] -// CHECK:STDOUT: %.loc29_40.2: type = converted %int.make_type_signed.loc29_37, %.loc29_40.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc29_37: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %Derived: type = class_type @Derived, @Derived(constants.%i32) [template = constants.%Derived.2] // CHECK:STDOUT: %int_32.loc29_46: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc29_46: init type = call constants.%Int(%int_32.loc29_46) [template = constants.%i32] -// CHECK:STDOUT: %.loc29_46.1: type = value_of_initializer %int.make_type_signed.loc29_46 [template = constants.%i32] -// CHECK:STDOUT: %.loc29_46.2: type = converted %int.make_type_signed.loc29_46, %.loc29_46.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc29_46: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %x.param: %Derived.2 = value_param runtime_param0 // CHECK:STDOUT: %x: %Derived.2 = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -718,13 +708,13 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Base.loc9_22.2 => constants.%Base.2 -// CHECK:STDOUT: %require_complete.loc9 => constants.%complete_type.4 +// CHECK:STDOUT: %require_complete.loc9 => constants.%complete_type.5 // CHECK:STDOUT: %Derived => constants.%Derived.2 // CHECK:STDOUT: %Derived.elem.loc9 => constants.%Derived.elem.3 -// CHECK:STDOUT: %require_complete.loc10 => constants.%complete_type.3 +// CHECK:STDOUT: %require_complete.loc10 => constants.%complete_type.4 // CHECK:STDOUT: %Derived.elem.loc10 => constants.%Derived.elem.4 // CHECK:STDOUT: %struct_type.base.d => constants.%struct_type.base.d.3 -// CHECK:STDOUT: %complete_type.loc11_1.2 => constants.%complete_type.5 +// CHECK:STDOUT: %complete_type.loc11_1.2 => constants.%complete_type.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Base(constants.%i32) { @@ -732,10 +722,10 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %T.patt.loc4_17.2 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%complete_type.3 +// CHECK:STDOUT: %require_complete => constants.%complete_type.4 // CHECK:STDOUT: %Base => constants.%Base.2 // CHECK:STDOUT: %Base.elem => constants.%Base.elem.2 // CHECK:STDOUT: %struct_type.b => constants.%struct_type.b.2 -// CHECK:STDOUT: %complete_type.loc6_1.2 => constants.%complete_type.4 +// CHECK:STDOUT: %complete_type.loc6_1.2 => constants.%complete_type.5 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/redeclare.carbon b/toolchain/check/testdata/class/generic/redeclare.carbon index 17e39d80b9c7..bb0eb10ba11e 100644 --- a/toolchain/check/testdata/class/generic/redeclare.carbon +++ b/toolchain/check/testdata/class/generic/redeclare.carbon @@ -209,27 +209,25 @@ class E(U:! type) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %N.1: %i32 = bind_symbolic_name N, 0 [symbolic] -// CHECK:STDOUT: %N.patt.1: %i32 = symbolic_binding_pattern N, 0 [symbolic] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %N.2: %i32 = bind_symbolic_name N, 0 [symbolic] +// CHECK:STDOUT: %N.patt.2: %i32 = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %B.type: type = generic_class_type @B [template] // CHECK:STDOUT: %B.generic: %B.type = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %N.2: %T = bind_symbolic_name N, 1 [symbolic] -// CHECK:STDOUT: %N.patt.2: %T = symbolic_binding_pattern N, 1 [symbolic] +// CHECK:STDOUT: %N.3: %T = bind_symbolic_name N, 1 [symbolic] +// CHECK:STDOUT: %N.patt.3: %T = symbolic_binding_pattern N, 1 [symbolic] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] // CHECK:STDOUT: %.generic: %.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = class_type @.1, @.1(%T, %N.2) [symbolic] +// CHECK:STDOUT: %.1: type = class_type @.1, @.1(%T, %N.3) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -242,33 +240,31 @@ class E(U:! type) {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %B.decl: %B.type = class_decl @B [template = constants.%B.generic] { -// CHECK:STDOUT: %N.patt.loc4_9.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_9.2 (constants.%N.patt.1)] -// CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc4_9.1, runtime_param [symbolic = %N.patt.loc4_9.2 (constants.%N.patt.1)] +// CHECK:STDOUT: %N.patt.loc4_9.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_9.2 (constants.%N.patt.2)] +// CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc4_9.1, runtime_param [symbolic = %N.patt.loc4_9.2 (constants.%N.patt.2)] // CHECK:STDOUT: } { // 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_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_13.2: type = converted %int.make_type_signed, %.loc4_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param -// CHECK:STDOUT: %N.loc4_9.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc4_9.2 (constants.%N.1)] +// CHECK:STDOUT: %N.loc4_9.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc4_9.2 (constants.%N.2)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.generic] { // CHECK:STDOUT: %T.patt.loc12_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_9.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc12_9.1, runtime_param [symbolic = %T.patt.loc12_9.2 (constants.%T.patt)] -// CHECK:STDOUT: %N.patt.loc12_19.1: @.1.%T.loc12_9.2 (%T) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc12_19.2 (constants.%N.patt.2)] -// CHECK:STDOUT: %N.param_patt: @.1.%T.loc12_9.2 (%T) = value_param_pattern %N.patt.loc12_19.1, runtime_param [symbolic = %N.patt.loc12_19.2 (constants.%N.patt.2)] +// CHECK:STDOUT: %N.patt.loc12_19.1: @.1.%T.loc12_9.2 (%T) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc12_19.2 (constants.%N.patt.3)] +// CHECK:STDOUT: %N.param_patt: @.1.%T.loc12_9.2 (%T) = value_param_pattern %N.patt.loc12_19.1, runtime_param [symbolic = %N.patt.loc12_19.2 (constants.%N.patt.3)] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc12_9.1 [symbolic = %T.loc12_9.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc12_9.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc12_9.2 (constants.%T)] // CHECK:STDOUT: %N.param: @.1.%T.loc12_9.2 (%T) = value_param runtime_param -// CHECK:STDOUT: %N.loc12_19.1: @.1.%T.loc12_9.2 (%T) = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc12_19.2 (constants.%N.2)] +// CHECK:STDOUT: %N.loc12_19.1: @.1.%T.loc12_9.2 (%T) = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc12_19.2 (constants.%N.3)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @B(%N.loc4_9.1: %i32) { -// CHECK:STDOUT: %N.loc4_9.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc4_9.2 (constants.%N.1)] -// CHECK:STDOUT: %N.patt.loc4_9.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_9.2 (constants.%N.patt.1)] +// CHECK:STDOUT: %N.loc4_9.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc4_9.2 (constants.%N.2)] +// CHECK:STDOUT: %N.patt.loc4_9.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_9.2 (constants.%N.patt.2)] // CHECK:STDOUT: // CHECK:STDOUT: class; // CHECK:STDOUT: } @@ -276,13 +272,13 @@ class E(U:! type) {} // CHECK:STDOUT: generic class @.1(%T.loc12_9.1: type, %N.loc12_19.1: @.1.%T.loc12_9.2 (%T)) { // CHECK:STDOUT: %T.loc12_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc12_9.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc12_9.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_9.2 (constants.%T.patt)] -// CHECK:STDOUT: %N.loc12_19.2: %T = bind_symbolic_name N, 1 [symbolic = %N.loc12_19.2 (constants.%N.2)] -// CHECK:STDOUT: %N.patt.loc12_19.2: %T = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc12_19.2 (constants.%N.patt.2)] +// CHECK:STDOUT: %N.loc12_19.2: %T = bind_symbolic_name N, 1 [symbolic = %N.loc12_19.2 (constants.%N.3)] +// CHECK:STDOUT: %N.patt.loc12_19.2: %T = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc12_19.2 (constants.%N.patt.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%.1 @@ -290,16 +286,16 @@ class E(U:! type) {} // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @B(constants.%N.1) { -// CHECK:STDOUT: %N.loc4_9.2 => constants.%N.1 -// CHECK:STDOUT: %N.patt.loc4_9.2 => constants.%N.1 +// CHECK:STDOUT: specific @B(constants.%N.2) { +// CHECK:STDOUT: %N.loc4_9.2 => constants.%N.2 +// CHECK:STDOUT: %N.patt.loc4_9.2 => constants.%N.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @.1(constants.%T, constants.%N.2) { +// CHECK:STDOUT: specific @.1(constants.%T, constants.%N.3) { // CHECK:STDOUT: %T.loc12_9.2 => constants.%T // CHECK:STDOUT: %T.patt.loc12_9.2 => constants.%T -// CHECK:STDOUT: %N.loc12_19.2 => constants.%N.2 -// CHECK:STDOUT: %N.patt.loc12_19.2 => constants.%N.2 +// CHECK:STDOUT: %N.loc12_19.2 => constants.%N.3 +// CHECK:STDOUT: %N.patt.loc12_19.2 => constants.%N.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_mismatch_param_count.carbon @@ -310,21 +306,19 @@ class E(U:! type) {} // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %U: %i32 = bind_symbolic_name U, 1 [symbolic] // CHECK:STDOUT: %U.patt: %i32 = symbolic_binding_pattern U, 1 [symbolic] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] // CHECK:STDOUT: %.generic: %.type = struct_value () [template] // CHECK:STDOUT: %.1: type = class_type @.1, @.1(%T, %U) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -350,9 +344,7 @@ class E(U:! type) {} // CHECK:STDOUT: %U.param_patt: %i32 = value_param_pattern %U.patt.loc12_19.1, runtime_param [symbolic = %U.patt.loc12_19.2 (constants.%U.patt)] // CHECK:STDOUT: } { // 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: %.loc12_23.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_23.2: type = converted %int.make_type_signed, %.loc12_23.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc12_9.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc12_9.2 (constants.%T)] // CHECK:STDOUT: %U.param: %i32 = value_param runtime_param @@ -376,7 +368,7 @@ class E(U:! type) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%.1 @@ -404,21 +396,19 @@ class E(U:! type) {} // CHECK:STDOUT: %D.type: type = generic_class_type @D [template] // CHECK:STDOUT: %D.generic: %D.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %T.2: %i32 = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.2: %i32 = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] // CHECK:STDOUT: %.generic: %.type = struct_value () [template] // CHECK:STDOUT: %.1: type = class_type @.1, @.1(%T.2) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -442,9 +432,7 @@ class E(U:! type) {} // CHECK:STDOUT: %T.param_patt: %i32 = value_param_pattern %T.patt.loc12_9.1, runtime_param [symbolic = %T.patt.loc12_9.2 (constants.%T.patt.2)] // CHECK:STDOUT: } { // 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: %.loc12_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_signed, %.loc12_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %T.param: %i32 = value_param runtime_param // CHECK:STDOUT: %T.loc12_9.1: %i32 = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc12_9.2 (constants.%T.2)] // CHECK:STDOUT: } @@ -464,7 +452,7 @@ class E(U:! type) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%.1 diff --git a/toolchain/check/testdata/class/generic/stringify.carbon b/toolchain/check/testdata/class/generic/stringify.carbon index 382f305d4ee7..b3626e94639f 100644 --- a/toolchain/check/testdata/class/generic/stringify.carbon +++ b/toolchain/check/testdata/class/generic/stringify.carbon @@ -137,15 +137,13 @@ var v: C(123) = (); // CHECK:STDOUT: %Inner.generic.1: %Inner.type.1 = struct_value () [symbolic] // CHECK:STDOUT: %Inner.1: type = class_type @Inner, @Inner(%T, %U) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %ptr.1: type = ptr_type %empty_struct_type [template] // CHECK:STDOUT: %Outer.2: type = class_type @Outer, @Outer(%ptr.1) [template] // CHECK:STDOUT: %Inner.type.2: type = generic_class_type @Inner, @Outer(%ptr.1) [template] // CHECK:STDOUT: %Inner.generic.2: %Inner.type.2 = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template] // CHECK:STDOUT: %ptr.2: type = ptr_type %struct_type.a [template] // CHECK:STDOUT: %Inner.2: type = class_type @Inner, @Inner(%ptr.1, %ptr.2) [template] @@ -154,7 +152,7 @@ var v: C(123) = (); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -190,9 +188,7 @@ var v: C(123) = (); // CHECK:STDOUT: %.loc19_18: %Inner.type.2 = specific_constant @Outer.%Inner.decl, @Outer(constants.%ptr.1) [template = constants.%Inner.generic.2] // CHECK:STDOUT: %Inner.ref: %Inner.type.2 = name_ref Inner, %.loc19_18 [template = constants.%Inner.generic.2] // 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: %.loc19_30.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc19_30.2: type = converted %int.make_type_signed, %.loc19_30.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a] // CHECK:STDOUT: %ptr.loc19_34: type = ptr_type %struct_type.a [template = constants.%ptr.2] // CHECK:STDOUT: %Inner: type = class_type @Inner, @Inner(constants.%ptr.1, constants.%ptr.2) [template = constants.%Inner.2] @@ -216,7 +212,7 @@ var v: C(123) = (); // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc5_15.1: type = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc5_15.2 (constants.%U)] // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Outer.1 @@ -232,7 +228,7 @@ var v: C(123) = (); // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Inner.1 @@ -283,23 +279,21 @@ var v: C(123) = (); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %N.1: %i32 = bind_symbolic_name N, 0 [symbolic] -// CHECK:STDOUT: %N.patt.1: %i32 = symbolic_binding_pattern N, 0 [symbolic] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %N.2: %i32 = bind_symbolic_name N, 0 [symbolic] +// CHECK:STDOUT: %N.patt.2: %i32 = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] -// CHECK:STDOUT: %C.1: type = class_type @C, @C(%N.1) [symbolic] +// CHECK:STDOUT: %C.1: type = class_type @C, @C(%N.2) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %int_123.1: Core.IntLiteral = int_value 123 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_123.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_123.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_123.2: %i32 = int_value 123 [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%int_123.2) [template] @@ -308,7 +302,7 @@ var v: C(123) = (); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -322,19 +316,17 @@ var v: C(123) = (); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] { -// CHECK:STDOUT: %N.patt.loc4_9.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_9.2 (constants.%N.patt.1)] -// CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc4_9.1, runtime_param [symbolic = %N.patt.loc4_9.2 (constants.%N.patt.1)] +// CHECK:STDOUT: %N.patt.loc4_9.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_9.2 (constants.%N.patt.2)] +// CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc4_9.1, runtime_param [symbolic = %N.patt.loc4_9.2 (constants.%N.patt.2)] // CHECK:STDOUT: } { // 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_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_13.2: type = converted %int.make_type_signed, %.loc4_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param -// CHECK:STDOUT: %N.loc4_9.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc4_9.2 (constants.%N.1)] +// CHECK:STDOUT: %N.loc4_9.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc4_9.2 (constants.%N.2)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.ref: %C.type = name_ref C, %C.decl [template = constants.%C.generic] // CHECK:STDOUT: %int_123: Core.IntLiteral = int_value 123 [template = constants.%int_123.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_123, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_123) [template = constants.%int_123.2] @@ -346,13 +338,13 @@ var v: C(123) = (); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @C(%N.loc4_9.1: %i32) { -// CHECK:STDOUT: %N.loc4_9.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc4_9.2 (constants.%N.1)] -// CHECK:STDOUT: %N.patt.loc4_9.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_9.2 (constants.%N.patt.1)] +// CHECK:STDOUT: %N.loc4_9.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc4_9.2 (constants.%N.2)] +// CHECK:STDOUT: %N.patt.loc4_9.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_9.2 (constants.%N.patt.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.1 @@ -368,9 +360,9 @@ var v: C(123) = (); // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%N.1) { -// CHECK:STDOUT: %N.loc4_9.2 => constants.%N.1 -// CHECK:STDOUT: %N.patt.loc4_9.2 => constants.%N.1 +// CHECK:STDOUT: specific @C(constants.%N.2) { +// CHECK:STDOUT: %N.loc4_9.2 => constants.%N.2 +// CHECK:STDOUT: %N.patt.loc4_9.2 => constants.%N.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%int_123.2) { diff --git a/toolchain/check/testdata/class/import.carbon b/toolchain/check/testdata/class/import.carbon index 2dc900296825..8dda32981715 100644 --- a/toolchain/check/testdata/class/import.carbon +++ b/toolchain/check/testdata/class/import.carbon @@ -57,12 +57,10 @@ fn Run() { // CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Field: type = class_type @Field [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Field.elem: type = unbound_element_type %Field, %i32 [template] // CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %i32} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.x [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %ForwardDeclared: type = class_type @ForwardDeclared [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] @@ -74,7 +72,7 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -106,15 +104,13 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: class @Field { // 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: %.loc8_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_10.2: type = converted %int.make_type_signed, %.loc8_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8: %Field.elem = field_decl x, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template = constants.%complete_type.2] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc8: %Field.elem = field_decl x, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Field -// CHECK:STDOUT: .x = %.loc8_8 +// CHECK:STDOUT: .x = %.loc8 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -164,22 +160,22 @@ fn Run() { // CHECK:STDOUT: %Empty.val: %Empty = struct_value () [template] // CHECK:STDOUT: %Field: type = class_type @Field [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %struct_type.x.1: type = struct_type {.x: %i32} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.x.1 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.x.1 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %struct_type.x.2: type = struct_type {.x: 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %Field.val: %Field = struct_value (%int_1.2) [template] // CHECK:STDOUT: %Field.elem: type = unbound_element_type %Field, %i32 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %ForwardDeclared.1: type = class_type @ForwardDeclared.1 [template] @@ -199,23 +195,23 @@ fn Run() { // CHECK:STDOUT: %import_ref.3: type = import_ref Main//a, ForwardDeclared, loaded [template = constants.%ForwardDeclared.1] // CHECK:STDOUT: %import_ref.4: type = import_ref Main//a, Incomplete, loaded [template = constants.%Incomplete] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .ImplicitAs = %import_ref.10 +// CHECK:STDOUT: .ImplicitAs = %import_ref.13 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5: = import_ref Main//a, loc5_1, loaded [template = constants.%complete_type.1] // CHECK:STDOUT: %import_ref.6 = import_ref Main//a, inst16 [no loc], unloaded -// CHECK:STDOUT: %import_ref.7: = import_ref Main//a, loc9_1, loaded [template = constants.%complete_type.2] -// CHECK:STDOUT: %import_ref.8 = import_ref Main//a, inst21 [no loc], unloaded -// CHECK:STDOUT: %import_ref.9: %Field.elem = import_ref Main//a, loc8_8, loaded [template = %.1] -// CHECK:STDOUT: %import_ref.46: = import_ref Main//a, loc16_1, loaded [template = constants.%complete_type.1] -// CHECK:STDOUT: %import_ref.47 = import_ref Main//a, inst43 [no loc], unloaded -// CHECK:STDOUT: %import_ref.48: %F.type = import_ref Main//a, loc14_21, loaded [template = constants.%F] -// CHECK:STDOUT: %import_ref.49: %G.type = import_ref Main//a, loc15_27, loaded [template = constants.%G] -// CHECK:STDOUT: %import_ref.50: = import_ref Main//a, loc16_1, loaded [template = constants.%complete_type.1] -// CHECK:STDOUT: %import_ref.51 = import_ref Main//a, inst43 [no loc], unloaded -// CHECK:STDOUT: %import_ref.52 = import_ref Main//a, loc14_21, unloaded -// CHECK:STDOUT: %import_ref.53 = import_ref Main//a, loc15_27, unloaded +// CHECK:STDOUT: %import_ref.10: = import_ref Main//a, loc9_1, loaded [template = constants.%complete_type.3] +// CHECK:STDOUT: %import_ref.11 = import_ref Main//a, inst21 [no loc], unloaded +// CHECK:STDOUT: %import_ref.12: %Field.elem = import_ref Main//a, loc8_8, loaded [template = %.1] +// CHECK:STDOUT: %import_ref.201: = import_ref Main//a, loc16_1, loaded [template = constants.%complete_type.1] +// CHECK:STDOUT: %import_ref.202 = import_ref Main//a, inst56 [no loc], unloaded +// CHECK:STDOUT: %import_ref.203: %F.type = import_ref Main//a, loc14_21, loaded [template = constants.%F] +// CHECK:STDOUT: %import_ref.204: %G.type = import_ref Main//a, loc15_27, loaded [template = constants.%G] +// CHECK:STDOUT: %import_ref.205: = import_ref Main//a, loc16_1, loaded [template = constants.%complete_type.1] +// CHECK:STDOUT: %import_ref.206 = import_ref Main//a, inst56 [no loc], unloaded +// CHECK:STDOUT: %import_ref.207 = import_ref Main//a, loc14_21, unloaded +// CHECK:STDOUT: %import_ref.208 = import_ref Main//a, loc15_27, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -240,25 +236,25 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: class @Field [from "a.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.8 -// CHECK:STDOUT: .x = imports.%import_ref.9 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.7 +// CHECK:STDOUT: .Self = imports.%import_ref.11 +// CHECK:STDOUT: .x = imports.%import_ref.12 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.10 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @ForwardDeclared.1 [from "a.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.47 -// CHECK:STDOUT: .F = imports.%import_ref.48 -// CHECK:STDOUT: .G = imports.%import_ref.49 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.46 +// CHECK:STDOUT: .Self = imports.%import_ref.202 +// CHECK:STDOUT: .F = imports.%import_ref.203 +// CHECK:STDOUT: .G = imports.%import_ref.204 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.201 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @ForwardDeclared.2 [from "a.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.51 -// CHECK:STDOUT: .F = imports.%import_ref.52 -// CHECK:STDOUT: .G = imports.%import_ref.53 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.50 +// CHECK:STDOUT: .Self = imports.%import_ref.206 +// CHECK:STDOUT: .F = imports.%import_ref.207 +// CHECK:STDOUT: .G = imports.%import_ref.208 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.205 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Incomplete [from "a.carbon"]; @@ -277,7 +273,7 @@ fn Run() { // CHECK:STDOUT: %b: ref %Field = bind_name b, %b.var // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc9_25.1: %struct_type.x.2 = struct_literal (%int_1) -// CHECK:STDOUT: %impl.elem0.loc9: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9: = bound_method %int_1, %impl.elem0.loc9 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc9: = specific_function %Convert.bound.loc9, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %Convert.specific_fn.loc9(%int_1) [template = constants.%int_1.2] @@ -288,10 +284,10 @@ fn Run() { // CHECK:STDOUT: %.loc9_26: init %Field = converted %.loc9_25.1, %.loc9_25.5 [template = constants.%Field.val] // CHECK:STDOUT: assign %b.var, %.loc9_26 // CHECK:STDOUT: %b.ref: ref %Field = name_ref b, %b -// CHECK:STDOUT: %x.ref: %Field.elem = name_ref x, imports.%import_ref.9 [template = imports.%.1] +// CHECK:STDOUT: %x.ref: %Field.elem = name_ref x, imports.%import_ref.12 [template = imports.%.1] // CHECK:STDOUT: %.loc10_4: ref %i32 = class_element_access %b.ref, element0 // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc10: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc10: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc10: = bound_method %int_2, %impl.elem0.loc10 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc10: = specific_function %Convert.bound.loc10, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc10: init %i32 = call %Convert.specific_fn.loc10(%int_2) [template = constants.%int_2.2] @@ -305,12 +301,12 @@ fn Run() { // CHECK:STDOUT: %.loc12_30: init %ForwardDeclared.1 = converted %.loc12_29.1, %.loc12_29.2 [template = constants.%ForwardDeclared.val] // CHECK:STDOUT: assign %c.var, %.loc12_30 // CHECK:STDOUT: %c.ref.loc13: ref %ForwardDeclared.1 = name_ref c, %c -// CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.48 [template = constants.%F] +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.203 [template = constants.%F] // CHECK:STDOUT: %F.bound: = bound_method %c.ref.loc13, %F.ref // CHECK:STDOUT: %.loc13: %ForwardDeclared.1 = bind_value %c.ref.loc13 // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.bound(%.loc13) // CHECK:STDOUT: %c.ref.loc14: ref %ForwardDeclared.1 = name_ref c, %c -// CHECK:STDOUT: %G.ref: %G.type = name_ref G, imports.%import_ref.49 [template = constants.%G] +// CHECK:STDOUT: %G.ref: %G.type = name_ref G, imports.%import_ref.204 [template = constants.%G] // CHECK:STDOUT: %G.bound: = bound_method %c.ref.loc14, %G.ref // CHECK:STDOUT: %addr.loc14: %ptr.3 = addr_of %c.ref.loc14 // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.bound(%addr.loc14) @@ -330,5 +326,5 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F[%self.param_patt: %ForwardDeclared.1]() [from "a.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @G[addr .inst419: %ptr.3]() [from "a.carbon"]; +// CHECK:STDOUT: fn @G[addr .inst605: %ptr.3]() [from "a.carbon"]; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/import_base.carbon b/toolchain/check/testdata/class/import_base.carbon index c7984b69f5d3..25c1c062f52c 100644 --- a/toolchain/check/testdata/class/import_base.carbon +++ b/toolchain/check/testdata/class/import_base.carbon @@ -45,21 +45,19 @@ fn Run() { // CHECK:STDOUT: %Unused.type: type = fn_type @Unused [template] // CHECK:STDOUT: %Unused: %Unused.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Base.elem: type = unbound_element_type %Base, %i32 [template] // CHECK:STDOUT: %struct_type.x.unused: type = struct_type {.x: %i32, .unused: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x.unused [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.x.unused [template] // CHECK:STDOUT: %Child: type = class_type @Child [template] // CHECK:STDOUT: %Child.elem: type = unbound_element_type %Child, %Base [template] // CHECK:STDOUT: %struct_type.base: type = struct_type {.base: %Base} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.base [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -94,30 +92,26 @@ fn Run() { // CHECK:STDOUT: %self: %Base = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_32.loc8) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_10.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_10.2: type = converted %int.make_type_signed.loc8, %.loc8_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8: %Base.elem = field_decl x, element0 [template] +// CHECK:STDOUT: %i32.loc8: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc8: %Base.elem = field_decl x, element0 [template] // CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%int_32.loc9) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_15.1: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_15.2: type = converted %int.make_type_signed.loc9, %.loc9_15.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_13: %Base.elem = field_decl unused, element1 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.unused [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32.loc9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc9: %Base.elem = field_decl unused, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.unused [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .Unused = %Unused.decl -// CHECK:STDOUT: .x = %.loc8_8 -// CHECK:STDOUT: .unused = %.loc9_13 +// CHECK:STDOUT: .x = %.loc8 +// CHECK:STDOUT: .unused = %.loc9 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Child { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %.loc13: %Child.elem = base_decl %Base.ref, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base [template = constants.%complete_type.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Child @@ -139,30 +133,30 @@ fn Run() { // CHECK:STDOUT: %Child: type = class_type @Child [template] // CHECK:STDOUT: %Base: type = class_type @Base [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %struct_type.x.unused.1: type = struct_type {.x: %i32, .unused: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x.unused.1 [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.x.unused.1 [template] // CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %Base} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.base.1 [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %struct_type.x.unused.2: type = struct_type {.x: Core.IntLiteral, .unused: Core.IntLiteral} [template] // CHECK:STDOUT: %struct_type.base.3: type = struct_type {.base: %struct_type.x.unused.2} [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %Base.val: %Base = struct_value (%int_0.2, %int_1.2) [template] // CHECK:STDOUT: %Child.val: %Child = struct_value (%Base.val) [template] // CHECK:STDOUT: %Base.elem: type = unbound_element_type %Base, %i32 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -173,20 +167,20 @@ fn Run() { // CHECK:STDOUT: %import_ref.1 = import_ref Main//a, Base, unloaded // CHECK:STDOUT: %import_ref.2: type = import_ref Main//a, Child, loaded [template = constants.%Child] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .ImplicitAs = %import_ref.14 +// CHECK:STDOUT: .ImplicitAs = %import_ref.17 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: = import_ref Main//a, loc10_1, loaded [template = constants.%complete_type.1] -// CHECK:STDOUT: %import_ref.4 = import_ref Main//a, inst16 [no loc], unloaded -// CHECK:STDOUT: %import_ref.5: %F.type = import_ref Main//a, loc5_21, loaded [template = constants.%F] -// CHECK:STDOUT: %import_ref.6 = import_ref Main//a, loc6_26, unloaded -// CHECK:STDOUT: %import_ref.7: %Base.elem = import_ref Main//a, loc8_8, loaded [template = %.1] -// CHECK:STDOUT: %import_ref.8 = import_ref Main//a, loc9_13, unloaded -// CHECK:STDOUT: %import_ref.10: = import_ref Main//a, loc14_1, loaded [template = constants.%complete_type.2] -// CHECK:STDOUT: %import_ref.11 = import_ref Main//a, inst59 [no loc], unloaded -// CHECK:STDOUT: %import_ref.12 = import_ref Main//a, loc13_20, unloaded -// CHECK:STDOUT: %import_ref.13: type = import_ref Main//a, loc13_16, loaded [template = constants.%Base] +// CHECK:STDOUT: %import_ref.6: = import_ref Main//a, loc10_1, loaded [template = constants.%complete_type.2] +// CHECK:STDOUT: %import_ref.7 = import_ref Main//a, inst16 [no loc], unloaded +// CHECK:STDOUT: %import_ref.8: %F.type = import_ref Main//a, loc5_21, loaded [template = constants.%F] +// CHECK:STDOUT: %import_ref.9 = import_ref Main//a, loc6_26, unloaded +// CHECK:STDOUT: %import_ref.10: %Base.elem = import_ref Main//a, loc8_8, loaded [template = %.1] +// CHECK:STDOUT: %import_ref.11 = import_ref Main//a, loc9_13, unloaded +// CHECK:STDOUT: %import_ref.13: = import_ref Main//a, loc14_1, loaded [template = constants.%complete_type.3] +// CHECK:STDOUT: %import_ref.14 = import_ref Main//a, inst70 [no loc], unloaded +// CHECK:STDOUT: %import_ref.15 = import_ref Main//a, loc13_20, unloaded +// CHECK:STDOUT: %import_ref.16: type = import_ref Main//a, loc13_16, loaded [template = constants.%Base] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -203,20 +197,20 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: class @Child [from "a.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.11 -// CHECK:STDOUT: .base = imports.%import_ref.12 -// CHECK:STDOUT: extend imports.%import_ref.13 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.10 +// CHECK:STDOUT: .Self = imports.%import_ref.14 +// CHECK:STDOUT: .base = imports.%import_ref.15 +// CHECK:STDOUT: extend imports.%import_ref.16 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.13 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base [from "a.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.4 -// CHECK:STDOUT: .F = imports.%import_ref.5 -// CHECK:STDOUT: .Unused = imports.%import_ref.6 -// CHECK:STDOUT: .x = imports.%import_ref.7 -// CHECK:STDOUT: .unused = imports.%import_ref.8 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.3 +// CHECK:STDOUT: .Self = imports.%import_ref.7 +// CHECK:STDOUT: .F = imports.%import_ref.8 +// CHECK:STDOUT: .Unused = imports.%import_ref.9 +// CHECK:STDOUT: .x = imports.%import_ref.10 +// CHECK:STDOUT: .unused = imports.%import_ref.11 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { @@ -228,7 +222,7 @@ fn Run() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc7_47.1: %struct_type.x.unused.2 = struct_literal (%int_0, %int_1) // CHECK:STDOUT: %.loc7_48.1: %struct_type.base.3 = struct_literal (%.loc7_47.1) -// CHECK:STDOUT: %impl.elem0.loc7_47.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc7_47.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc7_47.1: = bound_method %int_0, %impl.elem0.loc7_47.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc7_47.1: = specific_function %Convert.bound.loc7_47.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc7_47.1: init %i32 = call %Convert.specific_fn.loc7_47.1(%int_0) [template = constants.%int_0.2] @@ -236,7 +230,7 @@ fn Run() { // CHECK:STDOUT: %.loc7_48.2: ref %Base = class_element_access %a.var, element0 // CHECK:STDOUT: %.loc7_47.3: ref %i32 = class_element_access %.loc7_48.2, element0 // CHECK:STDOUT: %.loc7_47.4: init %i32 = initialize_from %.loc7_47.2 to %.loc7_47.3 [template = constants.%int_0.2] -// CHECK:STDOUT: %impl.elem0.loc7_47.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc7_47.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc7_47.2: = bound_method %int_1, %impl.elem0.loc7_47.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc7_47.2: = specific_function %Convert.bound.loc7_47.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc7_47.2: init %i32 = call %Convert.specific_fn.loc7_47.2(%int_1) [template = constants.%int_1.2] @@ -249,19 +243,19 @@ fn Run() { // CHECK:STDOUT: %.loc7_49: init %Child = converted %.loc7_48.1, %.loc7_48.4 [template = constants.%Child.val] // CHECK:STDOUT: assign %a.var, %.loc7_49 // CHECK:STDOUT: %a.ref.loc8: ref %Child = name_ref a, %a -// CHECK:STDOUT: %x.ref: %Base.elem = name_ref x, imports.%import_ref.7 [template = imports.%.1] +// CHECK:STDOUT: %x.ref: %Base.elem = name_ref x, imports.%import_ref.10 [template = imports.%.1] // CHECK:STDOUT: %.loc8_4.1: ref %Base = class_element_access %a.ref.loc8, element0 // CHECK:STDOUT: %.loc8_4.2: ref %Base = converted %a.ref.loc8, %.loc8_4.1 // CHECK:STDOUT: %.loc8_4.3: ref %i32 = class_element_access %.loc8_4.2, element0 // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc8: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc8: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc8: = bound_method %int_2, %impl.elem0.loc8 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc8: = specific_function %Convert.bound.loc8, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %Convert.specific_fn.loc8(%int_2) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc8_7: init %i32 = converted %int_2, %int.convert_checked.loc8 [template = constants.%int_2.2] // CHECK:STDOUT: assign %.loc8_4.3, %.loc8_7 // CHECK:STDOUT: %a.ref.loc9: ref %Child = name_ref a, %a -// CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.5 [template = constants.%F] +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.8 [template = constants.%F] // CHECK:STDOUT: %F.bound: = bound_method %a.ref.loc9, %F.ref // CHECK:STDOUT: %.loc9_3.1: ref %Base = class_element_access %a.ref.loc9, element0 // CHECK:STDOUT: %.loc9_3.2: ref %Base = converted %a.ref.loc9, %.loc9_3.1 diff --git a/toolchain/check/testdata/class/inheritance_access.carbon b/toolchain/check/testdata/class/inheritance_access.carbon index 8e5b9fcaa438..3e6157e419e1 100644 --- a/toolchain/check/testdata/class/inheritance_access.carbon +++ b/toolchain/check/testdata/class/inheritance_access.carbon @@ -231,12 +231,10 @@ class B { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Shape: type = class_type @Shape [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Shape.elem: type = unbound_element_type %Shape, %i32 [template] // CHECK:STDOUT: %struct_type.x.y: type = struct_type {.x: %i32, .y: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x.y [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.x.y [template] // CHECK:STDOUT: %Circle: type = class_type @Circle [template] // CHECK:STDOUT: %Circle.elem: type = unbound_element_type %Circle, %Shape [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] @@ -244,12 +242,12 @@ class B { // CHECK:STDOUT: %GetPosition.type: type = fn_type @GetPosition [template] // CHECK:STDOUT: %GetPosition: %GetPosition.type = struct_value () [template] // CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %Shape} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.base.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -268,21 +266,17 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: class @Shape { // 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_20.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_20.2: type = converted %int.make_type_signed.loc5, %.loc5_20.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: %Shape.elem = field_decl x, element0 [template] +// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5: %Shape.elem = field_decl x, element0 [template] // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_20.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_20.2: type = converted %int.make_type_signed.loc6, %.loc6_20.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_18: %Shape.elem = field_decl y, element1 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.y [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc6: %Shape.elem = field_decl y, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.y [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Shape -// CHECK:STDOUT: .x [protected] = %.loc5_18 -// CHECK:STDOUT: .y [protected] = %.loc6_18 +// CHECK:STDOUT: .x [protected] = %.loc5 +// CHECK:STDOUT: .y [protected] = %.loc6 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -297,21 +291,17 @@ class B { // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Circle [template = constants.%Circle] // CHECK:STDOUT: %int_32.loc12_36: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc12_36: init type = call constants.%Int(%int_32.loc12_36) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12_36: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc12_41: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc12_41: init type = call constants.%Int(%int_32.loc12_41) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_44.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc12_36, %int.make_type_signed.loc12_41) -// CHECK:STDOUT: %.loc12_44.2: type = value_of_initializer %int.make_type_signed.loc12_36 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_44.3: type = converted %int.make_type_signed.loc12_36, %.loc12_44.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_44.4: type = value_of_initializer %int.make_type_signed.loc12_41 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_44.5: type = converted %int.make_type_signed.loc12_41, %.loc12_44.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_44.6: type = converted %.loc12_44.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc12_41: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_44.1: %tuple.type.1 = tuple_literal (%i32.loc12_36, %i32.loc12_41) +// CHECK:STDOUT: %.loc12_44.2: type = converted %.loc12_44.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %self.param: %Circle = value_param runtime_param0 // CHECK:STDOUT: %self: %Circle = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %tuple.type.2 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %tuple.type.2 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Circle @@ -324,12 +314,12 @@ class B { // CHECK:STDOUT: fn @GetPosition[%self.param_patt: %Circle]() -> %return.param_patt: %tuple.type.2 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref.loc13_13: %Circle = name_ref self, %self -// CHECK:STDOUT: %x.ref: %Shape.elem = name_ref x, @Shape.%.loc5_18 [template = @Shape.%.loc5_18] +// CHECK:STDOUT: %x.ref: %Shape.elem = name_ref x, @Shape.%.loc5 [template = @Shape.%.loc5] // CHECK:STDOUT: %.loc13_17.1: ref %Shape = class_element_access %self.ref.loc13_13, element0 // CHECK:STDOUT: %.loc13_17.2: ref %Shape = converted %self.ref.loc13_13, %.loc13_17.1 // CHECK:STDOUT: %.loc13_17.3: ref %i32 = class_element_access %.loc13_17.2, element0 // CHECK:STDOUT: %self.ref.loc13_21: %Circle = name_ref self, %self -// CHECK:STDOUT: %y.ref: %Shape.elem = name_ref y, @Shape.%.loc6_18 [template = @Shape.%.loc6_18] +// CHECK:STDOUT: %y.ref: %Shape.elem = name_ref y, @Shape.%.loc6 [template = @Shape.%.loc6] // CHECK:STDOUT: %.loc13_25.1: ref %Shape = class_element_access %self.ref.loc13_21, element0 // CHECK:STDOUT: %.loc13_25.2: ref %Shape = converted %self.ref.loc13_21, %.loc13_25.1 // CHECK:STDOUT: %.loc13_25.3: ref %i32 = class_element_access %.loc13_25.2, element1 @@ -357,25 +347,23 @@ class B { // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %B.elem: type = unbound_element_type %B, %A [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %A} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.base.1 [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %B [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %struct_type.base.3: type = struct_type {.base: %B} [template] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.base.3 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.base.3 [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -412,13 +400,11 @@ class B { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc10_21.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc10_21.2: type = converted %int.make_type_signed, %.loc10_21.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [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: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -445,7 +431,7 @@ class B { // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param1 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.3 [template = constants.%complete_type.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.3 [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -476,21 +462,19 @@ class B { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_5.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] // CHECK:STDOUT: %SomeProtectedFunction.type: type = fn_type @SomeProtectedFunction [template] // CHECK:STDOUT: %SomeProtectedFunction: %SomeProtectedFunction.type = struct_value () [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %B.elem: type = unbound_element_type %B, %A [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] @@ -498,13 +482,13 @@ class B { // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] // CHECK:STDOUT: %struct_type.base: type = struct_type {.base: %A} [template] -// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.base [template] +// CHECK:STDOUT: %complete_type.5: = complete_type_witness %struct_type.base [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -523,11 +507,9 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: class @A { // 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: %.loc5_32.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc5_32.2: type = converted %int.make_type_signed, %.loc5_32.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_5, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_5) [template = constants.%int_5.2] @@ -539,13 +521,11 @@ class B { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc6_43.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc6_43.2: type = converted %int.make_type_signed, %.loc6_43.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [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: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -562,9 +542,7 @@ class B { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc14_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_signed, %.loc14_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -573,13 +551,11 @@ class B { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc18_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc18_13.2: type = converted %int.make_type_signed, %.loc18_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [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: %complete_type: = complete_type_witness %struct_type.base [template = constants.%complete_type.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base [template = constants.%complete_type.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -593,7 +569,7 @@ class B { // CHECK:STDOUT: fn @SomeProtectedFunction() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_5, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_5) [template = constants.%int_5.2] @@ -624,23 +600,21 @@ class B { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Shape: type = class_type @Shape [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Shape.elem: type = unbound_element_type %Shape, %i32 [template] // CHECK:STDOUT: %struct_type.y: type = struct_type {.y: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.y [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.y [template] // CHECK:STDOUT: %Square: type = class_type @Square [template] // CHECK:STDOUT: %Square.elem: type = unbound_element_type %Square, %Shape [template] // CHECK:STDOUT: %GetPosition.type: type = fn_type @GetPosition [template] // CHECK:STDOUT: %GetPosition: %GetPosition.type = struct_value () [template] // CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %Shape} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.base.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -659,15 +633,13 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: class @Shape { // 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: %.loc5_18.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18.2: type = converted %int.make_type_signed, %.loc5_18.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_16: %Shape.elem = field_decl y, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.y [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5: %Shape.elem = field_decl y, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.y [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Shape -// CHECK:STDOUT: .y [private] = %.loc5_16 +// CHECK:STDOUT: .y [private] = %.loc5 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -682,15 +654,13 @@ class B { // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Square [template = constants.%Square] // 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_35.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_35.2: type = converted %int.make_type_signed, %.loc11_35.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param: %Square = value_param runtime_param0 // CHECK:STDOUT: %self: %Square = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Square @@ -962,19 +932,17 @@ class B { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_5.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Internal: type = class_type @Internal [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %B.elem: type = unbound_element_type %B, %Internal [template] @@ -983,13 +951,13 @@ class B { // CHECK:STDOUT: %SomeFunc.type: type = fn_type @SomeFunc [template] // CHECK:STDOUT: %SomeFunc: %SomeFunc.type = struct_value () [template] // CHECK:STDOUT: %struct_type.internal.1: type = struct_type {.internal: %Internal} [template] -// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.internal.1 [template] +// CHECK:STDOUT: %complete_type.5: = complete_type_witness %struct_type.internal.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -1010,11 +978,9 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: class @A { // 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_42.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_42.2: type = converted %int.make_type_signed.loc5, %.loc5_42.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_5.loc5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] -// CHECK:STDOUT: %impl.elem0.loc5: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc5: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc5: = bound_method %int_5.loc5, %impl.elem0.loc5 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc5: = specific_function %Convert.bound.loc5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc5: init %i32 = call %Convert.specific_fn.loc5(%int_5.loc5) [template = constants.%int_5.2] @@ -1022,18 +988,16 @@ class B { // CHECK:STDOUT: %.loc5_49.2: %i32 = converted %int_5.loc5, %.loc5_49.1 [template = constants.%int_5.2] // CHECK:STDOUT: %SOME_PROTECTED_CONSTANT: %i32 = bind_name SOME_PROTECTED_CONSTANT, %.loc5_49.2 // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_38.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_38.2: type = converted %int.make_type_signed.loc6, %.loc6_38.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_5.loc6: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] -// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc6: = bound_method %int_5.loc6, %impl.elem0.loc6 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc6: = specific_function %Convert.bound.loc6, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %Convert.specific_fn.loc6(%int_5.loc6) [template = constants.%int_5.2] // CHECK:STDOUT: %.loc6_45.1: %i32 = value_of_initializer %int.convert_checked.loc6 [template = constants.%int_5.2] // CHECK:STDOUT: %.loc6_45.2: %i32 = converted %int_5.loc6, %.loc6_45.1 [template = constants.%int_5.2] // CHECK:STDOUT: %SOME_PRIVATE_CONSTANT: %i32 = bind_name SOME_PRIVATE_CONSTANT, %.loc6_45.2 -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -1044,18 +1008,16 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: class @Internal { // 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: %.loc10_36.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc10_36.2: type = converted %int.make_type_signed, %.loc10_36.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_5, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_5) [template = constants.%int_5.2] // CHECK:STDOUT: %.loc10_43.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_5.2] // CHECK:STDOUT: %.loc10_43.2: %i32 = converted %int_5, %.loc10_43.1 [template = constants.%int_5.2] // CHECK:STDOUT: %INTERNAL_CONSTANT: %i32 = bind_name INTERNAL_CONSTANT, %.loc10_43.2 -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Internal @@ -1071,9 +1033,7 @@ class B { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc16_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_13.2: type = converted %int.make_type_signed, %.loc16_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -1085,15 +1045,13 @@ class B { // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%B [template = constants.%B] // 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: %.loc36_32.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc36_32.2: type = converted %int.make_type_signed, %.loc36_32.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param: %B = value_param runtime_param0 // CHECK:STDOUT: %self: %B = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.internal.1 [template = constants.%complete_type.4] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.internal.1 [template = constants.%complete_type.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -1127,23 +1085,21 @@ class B { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %A.elem: type = unbound_element_type %A, %i32 [template] // CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %B.elem: type = unbound_element_type %B, %A [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %A} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.base.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -1162,15 +1118,13 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: class @A { // 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: %.loc5_18.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18.2: type = converted %int.make_type_signed, %.loc5_18.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_16: %A.elem = field_decl x, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5: %A.elem = field_decl x, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A -// CHECK:STDOUT: .x [private] = %.loc5_16 +// CHECK:STDOUT: .x [private] = %.loc5 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1185,7 +1139,7 @@ class B { // CHECK:STDOUT: %self.param: %B = value_param runtime_param0 // CHECK:STDOUT: %self: %B = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -1208,23 +1162,21 @@ class B { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A: type = class_type @A [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %A.elem: type = unbound_element_type %A, %i32 [template] // CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.x [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %B.elem: type = unbound_element_type %B, %A [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %A} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.base.1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -1243,15 +1195,13 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: class @A { // 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: %.loc5_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc5_20.2: type = converted %int.make_type_signed, %.loc5_20.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: %A.elem = field_decl x, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5: %A.elem = field_decl x, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A -// CHECK:STDOUT: .x [protected] = %.loc5_18 +// CHECK:STDOUT: .x [protected] = %.loc5 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1266,7 +1216,7 @@ class B { // CHECK:STDOUT: %self.param: %B = value_param runtime_param0 // CHECK:STDOUT: %self: %B = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -1280,7 +1230,7 @@ class B { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %B = name_ref self, %self // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %x.ref: %A.elem = name_ref x, @A.%.loc5_18 [template = @A.%.loc5_18] +// CHECK:STDOUT: %x.ref: %A.elem = name_ref x, @A.%.loc5 [template = @A.%.loc5] // CHECK:STDOUT: %.loc12_9.1: ref %A = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc12_9.2: ref %A = converted %self.ref, %.loc12_9.1 // CHECK:STDOUT: %.loc12_9.3: ref %i32 = class_element_access %.loc12_9.2, element0 diff --git a/toolchain/check/testdata/class/init.carbon b/toolchain/check/testdata/class/init.carbon index 952972a660ea..4864e383294a 100644 --- a/toolchain/check/testdata/class/init.carbon +++ b/toolchain/check/testdata/class/init.carbon @@ -26,14 +26,12 @@ fn MakeReorder(n: i32, next: Class*) -> Class { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Class.elem.1: type = unbound_element_type %Class, %i32 [template] // CHECK:STDOUT: %ptr.1: type = ptr_type %Class [template] // CHECK:STDOUT: %Class.elem.2: type = unbound_element_type %Class, %ptr.1 [template] // CHECK:STDOUT: %struct_type.n.next: type = struct_type {.n: %i32, .next: %ptr.1} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n.next [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.n.next [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %Make: %Make.type = struct_value () [template] // CHECK:STDOUT: %MakeReorder.type: type = fn_type @MakeReorder [template] @@ -43,7 +41,7 @@ fn MakeReorder(n: i32, next: Class*) -> Class { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -67,9 +65,7 @@ fn MakeReorder(n: i32, next: Class*) -> Class { // CHECK:STDOUT: %return.param_patt: %Class = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // 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: %.loc16_12.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_12.2: type = converted %int.make_type_signed, %.loc16_12.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %Class.ref.loc16_23: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] // CHECK:STDOUT: %Class.ref.loc16_34: type = name_ref Class, file.%Class.decl [template = constants.%Class] @@ -89,9 +85,7 @@ fn MakeReorder(n: i32, next: Class*) -> Class { // CHECK:STDOUT: %return.param_patt: %Class = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // 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: %.loc20_19.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc20_19.2: type = converted %int.make_type_signed, %.loc20_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %Class.ref.loc20_30: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] // CHECK:STDOUT: %Class.ref.loc20_41: type = name_ref Class, file.%Class.decl [template = constants.%Class] @@ -106,18 +100,16 @@ fn MakeReorder(n: i32, next: Class*) -> Class { // CHECK:STDOUT: // CHECK:STDOUT: class @Class { // 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: %.loc12_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed, %.loc12_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8: %Class.elem.1 = field_decl n, element0 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12: %Class.elem.1 = field_decl n, element0 [template] // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] // CHECK:STDOUT: %.loc13: %Class.elem.2 = field_decl next, element1 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n.next [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n.next [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class -// CHECK:STDOUT: .n = %.loc12_8 +// CHECK:STDOUT: .n = %.loc12 // CHECK:STDOUT: .next = %.loc13 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/init_as.carbon b/toolchain/check/testdata/class/init_as.carbon index ff35a2ba27e7..ae17bfe7c386 100644 --- a/toolchain/check/testdata/class/init_as.carbon +++ b/toolchain/check/testdata/class/init_as.carbon @@ -22,25 +22,23 @@ fn F() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %i32 [template] // CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.a.b.1 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.a.b.1 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %Class.val: %Class = struct_value (%int_1.2, %int_2.2) [template] @@ -49,7 +47,7 @@ fn F() -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -68,9 +66,7 @@ fn F() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc16_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_11.2: type = converted %int.make_type_signed, %.loc16_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -78,21 +74,17 @@ fn F() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: class @Class { // 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: %.loc12_8: %Class.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12: %Class.elem = field_decl a, element0 [template] // 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_10.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_signed.loc13, %.loc13_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8: %Class.elem = field_decl b, element1 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13: %Class.elem = field_decl b, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class -// CHECK:STDOUT: .a = %.loc12_8 -// CHECK:STDOUT: .b = %.loc13_8 +// CHECK:STDOUT: .a = %.loc12 +// CHECK:STDOUT: .b = %.loc13 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -102,7 +94,7 @@ fn F() -> i32 { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc17_26.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %impl.elem0.loc17_26.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc17_26.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc17_26.1: = bound_method %int_1, %impl.elem0.loc17_26.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc17_26.1: = specific_function %Convert.bound.loc17_26.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc17_26.1: init %i32 = call %Convert.specific_fn.loc17_26.1(%int_1) [template = constants.%int_1.2] @@ -110,7 +102,7 @@ fn F() -> i32 { // CHECK:STDOUT: %.loc17_26.3: ref %Class = temporary_storage // CHECK:STDOUT: %.loc17_26.4: ref %i32 = class_element_access %.loc17_26.3, element0 // CHECK:STDOUT: %.loc17_26.5: init %i32 = initialize_from %.loc17_26.2 to %.loc17_26.4 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc17_26.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc17_26.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc17_26.2: = bound_method %int_2, %impl.elem0.loc17_26.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc17_26.2: = specific_function %Convert.bound.loc17_26.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc17_26.2: init %i32 = call %Convert.specific_fn.loc17_26.2(%int_2) [template = constants.%int_2.2] @@ -120,7 +112,7 @@ fn F() -> i32 { // CHECK:STDOUT: %.loc17_26.9: init %Class = class_init (%.loc17_26.5, %.loc17_26.8), %.loc17_26.3 [template = constants.%Class.val] // CHECK:STDOUT: %.loc17_26.10: ref %Class = temporary %.loc17_26.3, %.loc17_26.9 // CHECK:STDOUT: %.loc17_28: ref %Class = converted %.loc17_26.1, %.loc17_26.10 -// CHECK:STDOUT: %a.ref: %Class.elem = name_ref a, @Class.%.loc12_8 [template = @Class.%.loc12_8] +// CHECK:STDOUT: %a.ref: %Class.elem = name_ref a, @Class.%.loc12 [template = @Class.%.loc12] // CHECK:STDOUT: %.loc17_37.1: ref %i32 = class_element_access %.loc17_28, element0 // CHECK:STDOUT: %.loc17_37.2: %i32 = bind_value %.loc17_37.1 // CHECK:STDOUT: return %.loc17_37.2 diff --git a/toolchain/check/testdata/class/init_nested.carbon b/toolchain/check/testdata/class/init_nested.carbon index bda2de2154ca..921120aabeab 100644 --- a/toolchain/check/testdata/class/init_nested.carbon +++ b/toolchain/check/testdata/class/init_nested.carbon @@ -29,25 +29,23 @@ fn MakeOuter() -> Outer { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Inner: type = class_type @Inner [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Inner.elem: type = unbound_element_type %Inner, %i32 [template] // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.a.b [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.a.b [template] // CHECK:STDOUT: %MakeInner.type: type = fn_type @MakeInner [template] // CHECK:STDOUT: %MakeInner: %MakeInner.type = struct_value () [template] // CHECK:STDOUT: %Outer: type = class_type @Outer [template] // CHECK:STDOUT: %Outer.elem: type = unbound_element_type %Outer, %Inner [template] // CHECK:STDOUT: %struct_type.c.d.1: type = struct_type {.c: %Inner, .d: %Inner} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.c.d.1 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.c.d.1 [template] // CHECK:STDOUT: %MakeOuter.type: type = fn_type @MakeOuter [template] // CHECK:STDOUT: %MakeOuter: %MakeOuter.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -84,21 +82,17 @@ fn MakeOuter() -> Outer { // CHECK:STDOUT: // CHECK:STDOUT: class @Inner { // 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: %.loc12_8: %Inner.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12: %Inner.elem = field_decl a, element0 [template] // 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_10.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_signed.loc13, %.loc13_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8: %Inner.elem = field_decl b, element1 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13: %Inner.elem = field_decl b, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Inner -// CHECK:STDOUT: .a = %.loc12_8 -// CHECK:STDOUT: .b = %.loc13_8 +// CHECK:STDOUT: .a = %.loc12 +// CHECK:STDOUT: .b = %.loc13 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -107,7 +101,7 @@ fn MakeOuter() -> Outer { // CHECK:STDOUT: %.loc19: %Outer.elem = field_decl c, element0 [template] // CHECK:STDOUT: %Inner.ref.loc20: type = name_ref Inner, file.%Inner.decl [template = constants.%Inner] // CHECK:STDOUT: %.loc20: %Outer.elem = field_decl d, element1 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.c.d.1 [template = constants.%complete_type.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.c.d.1 [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Outer diff --git a/toolchain/check/testdata/class/method.carbon b/toolchain/check/testdata/class/method.carbon index 44cac1cd7185..da12f212d428 100644 --- a/toolchain/check/testdata/class/method.carbon +++ b/toolchain/check/testdata/class/method.carbon @@ -63,9 +63,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %ptr.1: type = ptr_type %Class [template] @@ -73,7 +71,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %i32 [template] // CHECK:STDOUT: %struct_type.k.1: type = struct_type {.k: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.k.1 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.k.1 [template] // CHECK:STDOUT: %Call.type: type = fn_type @Call [template] // CHECK:STDOUT: %Call: %Call.type = struct_value () [template] // CHECK:STDOUT: %CallAlias.type: type = fn_type @CallAlias [template] @@ -83,10 +81,10 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %struct_type.k.2: type = struct_type {.k: 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %Class.val: %Class = struct_value (%int_1.2) [template] @@ -107,7 +105,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -137,9 +135,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc20: type = name_ref Self, constants.%Class [template = constants.%Class] // 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_29.1: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32] -// CHECK:STDOUT: %.loc20_29.2: type = converted %int.make_type_signed.loc20, %.loc20_29.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param.loc20: %Class = value_param runtime_param0 // CHECK:STDOUT: %self.loc20: %Class = bind_name self, %self.param.loc20 // CHECK:STDOUT: %return.param.loc20: ref %i32 = out_param runtime_param1 @@ -153,9 +149,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // 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: %.loc24_22.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc24_22.2: type = converted %int.make_type_signed, %.loc24_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %c.param: %Class = value_param runtime_param0 // CHECK:STDOUT: %c: %Class = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -169,9 +163,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // 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: %.loc30_27.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc30_27.2: type = converted %int.make_type_signed, %.loc30_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %c.param: %Class = value_param runtime_param0 // CHECK:STDOUT: %c: %Class = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -182,9 +174,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc34_32.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc34_32.2: type = converted %int.make_type_signed, %.loc34_32.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -193,9 +183,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc38_22.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc38_22.2: type = converted %int.make_type_signed, %.loc38_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -208,9 +196,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] // 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: %.loc43_38.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc43_38.2: type = converted %int.make_type_signed, %.loc43_38.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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 %i32 = out_param runtime_param1 @@ -225,9 +211,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] // 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: %.loc47_38.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc47_38.2: type = converted %int.make_type_signed, %.loc47_38.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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 %i32 = out_param runtime_param1 @@ -246,9 +230,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc53_33.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc53_33.2: type = converted %int.make_type_signed, %.loc53_33.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -257,9 +239,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc57_33.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc57_33.2: type = converted %int.make_type_signed, %.loc57_33.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -274,9 +254,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc12: type = name_ref Self, constants.%Class [template = constants.%Class] // 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_25.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_25.2: type = converted %int.make_type_signed.loc12, %.loc12_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param.loc12: %Class = value_param runtime_param0 // CHECK:STDOUT: %self.loc12: %Class = bind_name self, %self.param.loc12 // CHECK:STDOUT: %return.param.loc12: ref %i32 = out_param runtime_param1 @@ -285,16 +263,14 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc13_8: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc13: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] // 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_31.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.2: type = converted %int.make_type_signed, %.loc13_31.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param: %ptr.1 = value_param runtime_param0 // CHECK:STDOUT: %self: %ptr.1 = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -303,25 +279,23 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %F.ref: %F.type = name_ref F, %F.decl [template = constants.%F] // CHECK:STDOUT: %A: %F.type = bind_alias A, %F.decl [template = constants.%F] // 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: %.loc17_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc17_10.2: type = converted %int.make_type_signed, %.loc17_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_8: %Class.elem = field_decl k, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.k.1 [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc17: %Class.elem = field_decl k, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.k.1 [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl // CHECK:STDOUT: .A = %A -// CHECK:STDOUT: .k = %.loc17_8 +// CHECK:STDOUT: .k = %.loc17 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F[%self.param_patt: %Class]() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %Class = name_ref self, %self.loc20 -// CHECK:STDOUT: %k.ref: %Class.elem = name_ref k, @Class.%.loc17_8 [template = @Class.%.loc17_8] +// CHECK:STDOUT: %k.ref: %Class.elem = name_ref k, @Class.%.loc17 [template = @Class.%.loc17] // CHECK:STDOUT: %.loc21_14.1: ref %i32 = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc21_14.2: %i32 = bind_value %.loc21_14.1 // CHECK:STDOUT: return %.loc21_14.2 @@ -356,7 +330,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc35_18.1: %struct_type.k.2 = struct_literal (%int_1) // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/class/nested_name.carbon b/toolchain/check/testdata/class/nested_name.carbon index 370e751d5c19..3c30950e6d65 100644 --- a/toolchain/check/testdata/class/nested_name.carbon +++ b/toolchain/check/testdata/class/nested_name.carbon @@ -28,14 +28,12 @@ fn G(o: Outer) { // CHECK:STDOUT: %Outer: type = class_type @Outer [template] // CHECK:STDOUT: %Inner: type = class_type @Inner [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Inner.elem: type = unbound_element_type %Inner, %i32 [template] // CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.n [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.n [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] @@ -44,7 +42,7 @@ fn G(o: Outer) { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -68,9 +66,7 @@ fn G(o: Outer) { // CHECK:STDOUT: %Outer.ref: type = name_ref Outer, file.%Outer.decl [template = constants.%Outer] // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, @Outer.%Inner.decl [template = constants.%Inner] // 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: %.loc17_26.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc17_26.2: type = converted %int.make_type_signed, %.loc17_26.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %oi.param: %Inner = value_param runtime_param0 // CHECK:STDOUT: %oi: %Inner = bind_name oi, %oi.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -88,7 +84,7 @@ fn G(o: Outer) { // CHECK:STDOUT: // CHECK:STDOUT: class @Outer { // CHECK:STDOUT: %Inner.decl: type = class_decl @Inner [template = constants.%Inner] {} {} -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Outer @@ -98,22 +94,20 @@ fn G(o: Outer) { // CHECK:STDOUT: // CHECK:STDOUT: class @Inner { // 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_12.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_12.2: type = converted %int.make_type_signed, %.loc13_12.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10: %Inner.elem = field_decl n, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13: %Inner.elem = field_decl n, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Inner -// CHECK:STDOUT: .n = %.loc13_10 +// CHECK:STDOUT: .n = %.loc13 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%oi.param_patt: %Inner) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %oi.ref: %Inner = name_ref oi, %oi -// CHECK:STDOUT: %n.ref: %Inner.elem = name_ref n, @Inner.%.loc13_10 [template = @Inner.%.loc13_10] +// CHECK:STDOUT: %n.ref: %Inner.elem = name_ref n, @Inner.%.loc13 [template = @Inner.%.loc13] // CHECK:STDOUT: %.loc18_12.1: ref %i32 = class_element_access %oi.ref, element0 // CHECK:STDOUT: %.loc18_12.2: %i32 = bind_value %.loc18_12.1 // CHECK:STDOUT: return %.loc18_12.2 diff --git a/toolchain/check/testdata/class/raw_self.carbon b/toolchain/check/testdata/class/raw_self.carbon index d44e54661030..9c884c627548 100644 --- a/toolchain/check/testdata/class/raw_self.carbon +++ b/toolchain/check/testdata/class/raw_self.carbon @@ -28,9 +28,7 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: %Class: type = class_type @Class [template] // CHECK:STDOUT: %ptr.1: type = ptr_type %Class [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] @@ -39,12 +37,12 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %i32 [template] // CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.n [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -60,16 +58,14 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %self.patt.loc17_17: %ptr.1 = binding_pattern self // CHECK:STDOUT: %self.param_patt.loc17_21: %ptr.1 = value_param_pattern %self.patt.loc17_17, runtime_param0 -// CHECK:STDOUT: %.loc17_12: auto = addr_pattern %self.param_patt.loc17_21 +// CHECK:STDOUT: %.loc17: auto = addr_pattern %self.param_patt.loc17_21 // CHECK:STDOUT: %self.patt.loc17_30: %i32 = binding_pattern r#self // CHECK:STDOUT: %self.param_patt.loc17_36: %i32 = value_param_pattern %self.patt.loc17_30, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc17: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %ptr.loc17: type = ptr_type %Class [template = constants.%ptr.1] // CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%int_32.loc17) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_38.1: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_38.2: type = converted %int.make_type_signed.loc17, %.loc17_38.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param.loc17_21: %ptr.1 = value_param runtime_param0 // CHECK:STDOUT: %self.loc17_17: %ptr.1 = bind_name self, %self.param.loc17_21 // CHECK:STDOUT: %self.param.loc17_36: %i32 = value_param runtime_param1 @@ -85,19 +81,13 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc21: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %int_32.loc21_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21_32: init type = call constants.%Int(%int_32.loc21_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_32.1: type = value_of_initializer %int.make_type_signed.loc21_32 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_32.2: type = converted %int.make_type_signed.loc21_32, %.loc21_32.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc21_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc21_41: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21_41: init type = call constants.%Int(%int_32.loc21_41) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc21_41: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc21_46: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21_46: init type = call constants.%Int(%int_32.loc21_46) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_49.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc21_41, %int.make_type_signed.loc21_46) -// CHECK:STDOUT: %.loc21_49.2: type = value_of_initializer %int.make_type_signed.loc21_41 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_49.3: type = converted %int.make_type_signed.loc21_41, %.loc21_49.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_49.4: type = value_of_initializer %int.make_type_signed.loc21_46 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_49.5: type = converted %int.make_type_signed.loc21_46, %.loc21_49.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_49.6: type = converted %.loc21_49.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc21_46: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc21_49.1: %tuple.type.1 = tuple_literal (%i32.loc21_41, %i32.loc21_46) +// CHECK:STDOUT: %.loc21_49.2: type = converted %.loc21_49.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %self.param.loc21_16: %Class = value_param runtime_param0 // CHECK:STDOUT: %self.loc21_12: %Class = bind_name self, %self.param.loc21_16 // CHECK:STDOUT: %self.param.loc21_30: %i32 = value_param runtime_param1 @@ -111,16 +101,14 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %self.patt.loc17_17: %ptr.1 = binding_pattern self // CHECK:STDOUT: %self.param_patt.loc17_21: %ptr.1 = value_param_pattern %self.patt.loc17_17, runtime_param0 -// CHECK:STDOUT: %.loc17_12: auto = addr_pattern %self.param_patt.loc17_21 +// CHECK:STDOUT: %.loc17: auto = addr_pattern %self.param_patt.loc17_21 // CHECK:STDOUT: %self.patt.loc17_30: %i32 = binding_pattern r#self // CHECK:STDOUT: %self.param_patt.loc17_36: %i32 = value_param_pattern %self.patt.loc17_30, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc12: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %ptr.loc12: type = ptr_type %Class [template = constants.%ptr.1] // 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_34.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_34.2: type = converted %int.make_type_signed.loc12, %.loc12_34.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param.loc12_17: %ptr.1 = value_param runtime_param0 // CHECK:STDOUT: %self.loc12_13: %ptr.1 = bind_name self, %self.param.loc12_17 // CHECK:STDOUT: %self.param.loc12_32: %i32 = value_param runtime_param1 @@ -136,19 +124,13 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc13: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %int_32.loc13_28: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_28: init type = call constants.%Int(%int_32.loc13_28) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_28.1: type = value_of_initializer %int.make_type_signed.loc13_28 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_28.2: type = converted %int.make_type_signed.loc13_28, %.loc13_28.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_28: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_37: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_37: init type = call constants.%Int(%int_32.loc13_37) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_37: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_42: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_42: init type = call constants.%Int(%int_32.loc13_42) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_45.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc13_37, %int.make_type_signed.loc13_42) -// CHECK:STDOUT: %.loc13_45.2: type = value_of_initializer %int.make_type_signed.loc13_37 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_45.3: type = converted %int.make_type_signed.loc13_37, %.loc13_45.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_45.4: type = value_of_initializer %int.make_type_signed.loc13_42 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_45.5: type = converted %int.make_type_signed.loc13_42, %.loc13_45.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_45.6: type = converted %.loc13_45.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc13_42: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_45.1: %tuple.type.1 = tuple_literal (%i32.loc13_37, %i32.loc13_42) +// CHECK:STDOUT: %.loc13_45.2: type = converted %.loc13_45.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %self.param.loc13_12: %Class = value_param runtime_param0 // CHECK:STDOUT: %self.loc13_8: %Class = bind_name self, %self.param.loc13_12 // CHECK:STDOUT: %self.param.loc13_26: %i32 = value_param runtime_param1 @@ -157,17 +139,15 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: %return.loc13: ref %tuple.type.2 = return_slot %return.param.loc13 // CHECK:STDOUT: } // 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: %.loc14_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_10.2: type = converted %int.make_type_signed, %.loc14_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_8: %Class.elem = field_decl n, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14: %Class.elem = field_decl n, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: .n = %.loc14_8 +// CHECK:STDOUT: .n = %.loc14 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -175,7 +155,7 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref.loc18_5: %ptr.1 = name_ref self, %self.loc17_17 // CHECK:STDOUT: %.loc18_4: ref %Class = deref %self.ref.loc18_5 -// CHECK:STDOUT: %n.ref: %Class.elem = name_ref n, @Class.%.loc14_8 [template = @Class.%.loc14_8] +// CHECK:STDOUT: %n.ref: %Class.elem = name_ref n, @Class.%.loc14 [template = @Class.%.loc14] // CHECK:STDOUT: %.loc18_10: ref %i32 = class_element_access %.loc18_4, element0 // CHECK:STDOUT: %self.ref.loc18_15: %i32 = name_ref r#self, %self.loc17_30 // CHECK:STDOUT: assign %.loc18_10, %self.ref.loc18_15 @@ -185,7 +165,7 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: fn @G[%self.param_patt.loc21_16: %Class](%self.param_patt.loc21_30: %i32) -> %return.param_patt: %tuple.type.2 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref.loc22_11: %Class = name_ref self, %self.loc21_12 -// CHECK:STDOUT: %n.ref: %Class.elem = name_ref n, @Class.%.loc14_8 [template = @Class.%.loc14_8] +// CHECK:STDOUT: %n.ref: %Class.elem = name_ref n, @Class.%.loc14 [template = @Class.%.loc14] // CHECK:STDOUT: %.loc22_15.1: ref %i32 = class_element_access %self.ref.loc22_11, element0 // CHECK:STDOUT: %.loc22_15.2: %i32 = bind_value %.loc22_15.1 // CHECK:STDOUT: %self.ref.loc22_19: %i32 = name_ref r#self, %self.loc21_24 diff --git a/toolchain/check/testdata/class/reenter_scope.carbon b/toolchain/check/testdata/class/reenter_scope.carbon index 6accdd6456f3..cd7ee591a915 100644 --- a/toolchain/check/testdata/class/reenter_scope.carbon +++ b/toolchain/check/testdata/class/reenter_scope.carbon @@ -23,20 +23,18 @@ fn Class.F() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -54,9 +52,7 @@ fn Class.F() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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_17.1: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_17.2: type = converted %int.make_type_signed.loc16, %.loc16_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param.loc16: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return.loc16: ref %i32 = return_slot %return.param.loc16 // CHECK:STDOUT: } @@ -68,9 +64,7 @@ fn Class.F() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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_13.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_signed.loc12, %.loc12_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param.loc12: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return.loc12: ref %i32 = return_slot %return.param.loc12 // CHECK:STDOUT: } @@ -79,13 +73,11 @@ fn Class.F() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_13.2: type = converted %int.make_type_signed, %.loc13_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [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: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class diff --git a/toolchain/check/testdata/class/reorder.carbon b/toolchain/check/testdata/class/reorder.carbon index 63c4e2b18a2d..2bebd570b347 100644 --- a/toolchain/check/testdata/class/reorder.carbon +++ b/toolchain/check/testdata/class/reorder.carbon @@ -23,21 +23,19 @@ class Class { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } @@ -45,7 +43,7 @@ class Class { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -66,9 +64,7 @@ class Class { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc12_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_signed, %.loc12_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -77,13 +73,11 @@ class Class { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc16_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_13.2: type = converted %int.make_type_signed, %.loc16_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [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: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -105,7 +99,7 @@ class Class { // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/class/reorder_qualified.carbon b/toolchain/check/testdata/class/reorder_qualified.carbon index 4332d925468f..1e751bccc03c 100644 --- a/toolchain/check/testdata/class/reorder_qualified.carbon +++ b/toolchain/check/testdata/class/reorder_qualified.carbon @@ -56,12 +56,10 @@ class A { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %BF: %BF.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %B.elem: type = unbound_element_type %B, %i32 [template] // CHECK:STDOUT: %struct_type.b.1: type = struct_type {.b: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.b.1 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.b.1 [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] @@ -69,42 +67,42 @@ class A { // CHECK:STDOUT: %DF: %DF.type = struct_value () [template] // CHECK:STDOUT: %D.elem: type = unbound_element_type %D, %i32 [template] // CHECK:STDOUT: %struct_type.d.1: type = struct_type {.d: %i32} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.d.1 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.d.1 [template] // CHECK:STDOUT: %CF.type: type = fn_type @CF [template] // CHECK:STDOUT: %CF: %CF.type = struct_value () [template] // CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %i32 [template] // CHECK:STDOUT: %struct_type.c.1: type = struct_type {.c: %i32} [template] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.c.1 [template] +// CHECK:STDOUT: %complete_type.5: = complete_type_witness %struct_type.c.1 [template] // CHECK:STDOUT: %AF.type: type = fn_type @AF [template] // CHECK:STDOUT: %AF: %AF.type = struct_value () [template] // CHECK:STDOUT: %A.elem: type = unbound_element_type %A, %i32 [template] // CHECK:STDOUT: %struct_type.a.1: type = struct_type {.a: %i32} [template] -// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.a.1 [template] +// CHECK:STDOUT: %complete_type.6: = complete_type_witness %struct_type.a.1 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %struct_type.a.2: type = struct_type {.a: 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %A.val: %A = struct_value (%int_1.2) [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %struct_type.b.2: type = struct_type {.b: Core.IntLiteral} [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %B.val: %B = struct_value (%int_2.2) [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %struct_type.c.2: type = struct_type {.c: Core.IntLiteral} [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %C.val: %C = struct_value (%int_3.2) [template] // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] // CHECK:STDOUT: %struct_type.d.2: type = struct_type {.d: Core.IntLiteral} [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_4.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: %D.val: %D = struct_value (%int_4.2) [template] @@ -113,7 +111,7 @@ class A { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -133,17 +131,15 @@ class A { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %AF.decl: %AF.type = fn_decl @AF [template = constants.%AF] {} {} // 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: %.loc46_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc46_10.2: type = converted %int.make_type_signed, %.loc46_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc46_8: %A.elem = field_decl a, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.1 [template = constants.%complete_type.4] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc46: %A.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.1 [template = constants.%complete_type.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: .AF = %AF.decl -// CHECK:STDOUT: .a = %.loc46_8 +// CHECK:STDOUT: .a = %.loc46 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -151,17 +147,15 @@ class A { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %BF.decl: %BF.type = fn_decl @BF [template = constants.%BF] {} {} // 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: %.loc16_12.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_12.2: type = converted %int.make_type_signed, %.loc16_12.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_10: %B.elem = field_decl b, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.b.1 [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc16: %B.elem = field_decl b, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.b.1 [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .BF = %BF.decl -// CHECK:STDOUT: .b = %.loc16_10 +// CHECK:STDOUT: .b = %.loc16 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -170,17 +164,15 @@ class A { // CHECK:STDOUT: %DF.decl: %DF.type = fn_decl @DF [template = constants.%DF] {} {} // CHECK:STDOUT: %CF.decl: %CF.type = fn_decl @CF [template = constants.%CF] {} {} // 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: %.loc42_12.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc42_12.2: type = converted %int.make_type_signed, %.loc42_12.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc42_10: %C.elem = field_decl c, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.c.1 [template = constants.%complete_type.3] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc42: %C.elem = field_decl c, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.c.1 [template = constants.%complete_type.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .D = %D.decl // CHECK:STDOUT: .CF = %CF.decl -// CHECK:STDOUT: .c = %.loc42_10 +// CHECK:STDOUT: .c = %.loc42 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -188,17 +180,15 @@ class A { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} // CHECK:STDOUT: %DF.decl: %DF.type = fn_decl @DF [template = constants.%DF] {} {} // 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: %.loc24_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc24_14.2: type = converted %int.make_type_signed, %.loc24_14.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc24_12: %D.elem = field_decl d, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.d.1 [template = constants.%complete_type.2] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc24: %D.elem = field_decl d, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.d.1 [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .DF = %DF.decl -// CHECK:STDOUT: .d = %.loc24_12 +// CHECK:STDOUT: .d = %.loc24 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -213,7 +203,7 @@ class A { // CHECK:STDOUT: %a: ref %A = bind_name a, %a.var // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc29_25.1: %struct_type.a.2 = struct_literal (%int_1) -// CHECK:STDOUT: %impl.elem0.loc29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc29: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc29: = bound_method %int_1, %impl.elem0.loc29 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc29: = specific_function %Convert.bound.loc29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc29: init %i32 = call %Convert.specific_fn.loc29(%int_1) [template = constants.%int_1.2] @@ -228,7 +218,7 @@ class A { // CHECK:STDOUT: %b: ref %B = bind_name b, %b.var // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc30_25.1: %struct_type.b.2 = struct_literal (%int_2) -// CHECK:STDOUT: %impl.elem0.loc30: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc30: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc30: = bound_method %int_2, %impl.elem0.loc30 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc30: = specific_function %Convert.bound.loc30, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc30: init %i32 = call %Convert.specific_fn.loc30(%int_2) [template = constants.%int_2.2] @@ -243,7 +233,7 @@ class A { // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc31_25.1: %struct_type.c.2 = struct_literal (%int_3) -// CHECK:STDOUT: %impl.elem0.loc31: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc31: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc31: = bound_method %int_3, %impl.elem0.loc31 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc31: = specific_function %Convert.bound.loc31, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc31: init %i32 = call %Convert.specific_fn.loc31(%int_3) [template = constants.%int_3.2] @@ -258,7 +248,7 @@ class A { // CHECK:STDOUT: %d: ref %D = bind_name d, %d.var // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] // CHECK:STDOUT: %.loc32_25.1: %struct_type.d.2 = struct_literal (%int_4) -// CHECK:STDOUT: %impl.elem0.loc32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc32: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc32: = bound_method %int_4, %impl.elem0.loc32 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc32: = specific_function %Convert.bound.loc32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc32: init %i32 = call %Convert.specific_fn.loc32(%int_4) [template = constants.%int_4.2] diff --git a/toolchain/check/testdata/class/scope.carbon b/toolchain/check/testdata/class/scope.carbon index 16f7fe3fceea..37d7a955a74f 100644 --- a/toolchain/check/testdata/class/scope.carbon +++ b/toolchain/check/testdata/class/scope.carbon @@ -32,27 +32,25 @@ fn Run() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] @@ -62,7 +60,7 @@ fn Run() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -82,9 +80,7 @@ fn Run() { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc21_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc21_11.2: type = converted %int.make_type_signed, %.loc21_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -97,9 +93,7 @@ fn Run() { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc12_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_signed, %.loc12_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -108,13 +102,11 @@ fn Run() { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc16_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_13.2: type = converted %int.make_type_signed, %.loc16_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [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: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -126,7 +118,7 @@ fn Run() { // CHECK:STDOUT: fn @F.1() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] @@ -147,7 +139,7 @@ fn Run() { // CHECK:STDOUT: fn @F.2() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2, %impl.elem0 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_2) [template = constants.%int_2.2] @@ -159,18 +151,14 @@ fn Run() { // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_32.loc26: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc26: init type = call constants.%Int(%int_32.loc26) [template = constants.%i32] -// CHECK:STDOUT: %.loc26_10.1: type = value_of_initializer %int.make_type_signed.loc26 [template = constants.%i32] -// CHECK:STDOUT: %.loc26_10.2: type = converted %int.make_type_signed.loc26, %.loc26_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: %F.ref.loc26: %F.type.2 = name_ref F, file.%F.decl [template = constants.%F.2] // CHECK:STDOUT: %F.call.loc26: init %i32 = call %F.ref.loc26() // CHECK:STDOUT: assign %a.var, %F.call.loc26 // CHECK:STDOUT: %int_32.loc27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc27: init type = call constants.%Int(%int_32.loc27) [template = constants.%i32] -// CHECK:STDOUT: %.loc27_10.1: type = value_of_initializer %int.make_type_signed.loc27 [template = constants.%i32] -// CHECK:STDOUT: %.loc27_10.2: type = converted %int.make_type_signed.loc27, %.loc27_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] diff --git a/toolchain/check/testdata/class/self.carbon b/toolchain/check/testdata/class/self.carbon index 4ba9a050fa96..eda1353e5c40 100644 --- a/toolchain/check/testdata/class/self.carbon +++ b/toolchain/check/testdata/class/self.carbon @@ -46,9 +46,7 @@ class Class { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %ptr.1: type = ptr_type %Class [template] @@ -56,12 +54,12 @@ class Class { // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %i32 [template] // CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.n [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -82,9 +80,7 @@ class Class { // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc11: type = name_ref Self, constants.%Class [template = constants.%Class] // 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_29.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_29.2: type = converted %int.make_type_signed.loc11, %.loc11_29.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param.loc11: %Class = value_param runtime_param0 // CHECK:STDOUT: %self.loc11: %Class = bind_name self, %self.param.loc11 // CHECK:STDOUT: %return.param.loc11: ref %i32 = out_param runtime_param1 @@ -93,16 +89,14 @@ class Class { // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc15_12: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc15: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc15: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %ptr.loc15: type = ptr_type %Class [template = constants.%ptr.1] // 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_35.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_35.2: type = converted %int.make_type_signed.loc15, %.loc15_35.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param.loc15: %ptr.1 = value_param runtime_param0 // CHECK:STDOUT: %self.loc15: %ptr.1 = bind_name self, %self.param.loc15 // CHECK:STDOUT: %return.param.loc15: ref %i32 = out_param runtime_param1 @@ -119,9 +113,7 @@ class Class { // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc5: type = name_ref Self, constants.%Class [template = constants.%Class] // 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_25.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_25.2: type = converted %int.make_type_signed.loc5, %.loc5_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param.loc5: %Class = value_param runtime_param0 // CHECK:STDOUT: %self.loc5: %Class = bind_name self, %self.param.loc5 // CHECK:STDOUT: %return.param.loc5: ref %i32 = out_param runtime_param1 @@ -130,40 +122,36 @@ class Class { // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc15_12: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc15: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc6: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %ptr.loc6: type = ptr_type %Class [template = constants.%ptr.1] // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_31.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_31.2: type = converted %int.make_type_signed.loc6, %.loc6_31.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param.loc6: %ptr.1 = value_param runtime_param0 // CHECK:STDOUT: %self.loc6: %ptr.1 = bind_name self, %self.param.loc6 // CHECK:STDOUT: %return.param.loc6: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return.loc6: ref %i32 = return_slot %return.param.loc6 // CHECK:STDOUT: } // 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: %.loc8_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_10.2: type = converted %int.make_type_signed, %.loc8_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8: %Class.elem = field_decl n, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc8: %Class.elem = field_decl n, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: .n = %.loc8_8 +// CHECK:STDOUT: .n = %.loc8 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F[%self.param_patt: %Class]() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %Class = name_ref self, %self.loc11 -// CHECK:STDOUT: %n.ref: %Class.elem = name_ref n, @Class.%.loc8_8 [template = @Class.%.loc8_8] +// CHECK:STDOUT: %n.ref: %Class.elem = name_ref n, @Class.%.loc8 [template = @Class.%.loc8] // CHECK:STDOUT: %.loc12_14.1: ref %i32 = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc12_14.2: %i32 = bind_value %.loc12_14.1 // CHECK:STDOUT: return %.loc12_14.2 @@ -173,7 +161,7 @@ class Class { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %ptr.1 = name_ref self, %self.loc15 // CHECK:STDOUT: %.loc16_11: ref %Class = deref %self.ref -// CHECK:STDOUT: %n.ref: %Class.elem = name_ref n, @Class.%.loc8_8 [template = @Class.%.loc8_8] +// CHECK:STDOUT: %n.ref: %Class.elem = name_ref n, @Class.%.loc8 [template = @Class.%.loc8] // CHECK:STDOUT: %.loc16_17.1: ref %i32 = class_element_access %.loc16_11, element0 // CHECK:STDOUT: %.loc16_17.2: %i32 = bind_value %.loc16_17.1 // CHECK:STDOUT: return %.loc16_17.2 diff --git a/toolchain/check/testdata/class/self_conversion.carbon b/toolchain/check/testdata/class/self_conversion.carbon index a53b5be0226b..93b5fa090ecd 100644 --- a/toolchain/check/testdata/class/self_conversion.carbon +++ b/toolchain/check/testdata/class/self_conversion.carbon @@ -37,13 +37,11 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Base.elem: type = unbound_element_type %Base, %i32 [template] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.a [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.a [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] // CHECK:STDOUT: %Derived.elem: type = unbound_element_type %Derived, %Base [template] // CHECK:STDOUT: %SelfBase.type: type = fn_type @SelfBase [template] @@ -52,13 +50,13 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %AddrSelfBase.type: type = fn_type @AddrSelfBase [template] // CHECK:STDOUT: %AddrSelfBase: %AddrSelfBase.type = struct_value () [template] // CHECK:STDOUT: %struct_type.base.1: type = struct_type {.base: %Base} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.base.1 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.base.1 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %ptr.3: type = ptr_type %Derived [template] @@ -69,7 +67,7 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -93,9 +91,7 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %Base.ref.loc22: type = name_ref Base, file.%Base.decl [template = constants.%Base] // 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_38.1: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] -// CHECK:STDOUT: %.loc22_38.2: type = converted %int.make_type_signed.loc22, %.loc22_38.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param.loc22: %Base = value_param runtime_param0 // CHECK:STDOUT: %self.loc22: %Base = bind_name self, %self.param.loc22 // CHECK:STDOUT: %return.param.loc22: ref %i32 = out_param runtime_param1 @@ -120,9 +116,7 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] // CHECK:STDOUT: %ptr: type = ptr_type %Derived [template = constants.%ptr.3] // 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: %.loc30_25.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc30_25.2: type = converted %int.make_type_signed, %.loc30_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %p.param: %ptr.3 = value_param runtime_param0 // CHECK:STDOUT: %p: %ptr.3 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -132,15 +126,13 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: class @Base { // 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: %.loc12_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed, %.loc12_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8: %Base.elem = field_decl a, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12: %Base.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base -// CHECK:STDOUT: .a = %.loc12_8 +// CHECK:STDOUT: .a = %.loc12 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -155,9 +147,7 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %Base.ref.loc18: type = name_ref Base, file.%Base.decl [template = constants.%Base] // 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_32.1: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_32.2: type = converted %int.make_type_signed.loc18, %.loc18_32.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param.loc18: %Base = value_param runtime_param0 // CHECK:STDOUT: %self.loc18: %Base = bind_name self, %self.param.loc18 // CHECK:STDOUT: %return.param.loc18: ref %i32 = out_param runtime_param1 @@ -173,7 +163,7 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %self.param.loc19: %ptr.2 = value_param runtime_param0 // CHECK:STDOUT: %self.loc19: %ptr.2 = bind_name self, %self.param.loc19 // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -187,7 +177,7 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: fn @SelfBase[%self.param_patt: %Base]() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %Base = name_ref self, %self.loc22 -// CHECK:STDOUT: %a.ref: %Base.elem = name_ref a, @Base.%.loc12_8 [template = @Base.%.loc12_8] +// CHECK:STDOUT: %a.ref: %Base.elem = name_ref a, @Base.%.loc12 [template = @Base.%.loc12] // CHECK:STDOUT: %.loc23_14.1: ref %i32 = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc23_14.2: %i32 = bind_value %.loc23_14.1 // CHECK:STDOUT: return %.loc23_14.2 @@ -197,10 +187,10 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %ptr.2 = name_ref self, %self.loc26 // CHECK:STDOUT: %.loc27_4: ref %Base = deref %self.ref -// CHECK:STDOUT: %a.ref: %Base.elem = name_ref a, @Base.%.loc12_8 [template = @Base.%.loc12_8] +// CHECK:STDOUT: %a.ref: %Base.elem = name_ref a, @Base.%.loc12 [template = @Base.%.loc12] // CHECK:STDOUT: %.loc27_10: ref %i32 = class_element_access %.loc27_4, element0 // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/class/self_type.carbon b/toolchain/check/testdata/class/self_type.carbon index ab00635c1468..31ff802a5992 100644 --- a/toolchain/check/testdata/class/self_type.carbon +++ b/toolchain/check/testdata/class/self_type.carbon @@ -27,9 +27,7 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] @@ -37,12 +35,12 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: %ptr.1: type = ptr_type %Class [template] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %ptr.1 [template] // CHECK:STDOUT: %struct_type.p: type = struct_type {.p: %ptr.1} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.p [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.p [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -63,9 +61,7 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc21: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_29.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_29.2: type = converted %int.make_type_signed.loc21, %.loc21_29.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param.loc21: %Class = value_param runtime_param0 // CHECK:STDOUT: %self.loc21: %Class = bind_name self, %self.param.loc21 // CHECK:STDOUT: %return.param.loc21: ref %i32 = out_param runtime_param1 @@ -82,9 +78,7 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc12: type = name_ref Self, constants.%Class [template = constants.%Class] // 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_25.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_25.2: type = converted %int.make_type_signed.loc12, %.loc12_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param.loc12: %Class = value_param runtime_param0 // CHECK:STDOUT: %self.loc12: %Class = bind_name self, %self.param.loc12 // CHECK:STDOUT: %return.param.loc12: ref %i32 = out_param runtime_param1 @@ -101,7 +95,7 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] // CHECK:STDOUT: %.loc18: %Class.elem = field_decl p, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.p [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.p [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class diff --git a/toolchain/check/testdata/class/static_method.carbon b/toolchain/check/testdata/class/static_method.carbon index 944fc6efd0d8..1f533238d107 100644 --- a/toolchain/check/testdata/class/static_method.carbon +++ b/toolchain/check/testdata/class/static_method.carbon @@ -22,20 +22,18 @@ fn Run() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -54,16 +52,12 @@ fn Run() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc15_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_13.2: type = converted %int.make_type_signed, %.loc15_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [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: %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: %.loc15_17.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_17.2: type = converted %int.make_type_signed, %.loc15_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { @@ -72,13 +66,11 @@ fn Run() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc12_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_signed, %.loc12_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [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: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class diff --git a/toolchain/check/testdata/class/syntactic_merge_literal.carbon b/toolchain/check/testdata/class/syntactic_merge_literal.carbon index 9a119e08d014..f29cab40ed0e 100644 --- a/toolchain/check/testdata/class/syntactic_merge_literal.carbon +++ b/toolchain/check/testdata/class/syntactic_merge_literal.carbon @@ -34,22 +34,20 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %a: %i32 = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %i32 = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] // CHECK:STDOUT: %C.1: type = class_type @C, @C(%a) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %int_1000.1: Core.IntLiteral = int_value 1000 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1000.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1000.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1000.2: %i32 = int_value 1000 [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%int_1000.2) [template] @@ -63,7 +61,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -81,9 +79,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt.loc4_9.1, runtime_param [symbolic = %a.patt.loc4_9.2 (constants.%a.patt)] // CHECK:STDOUT: } { // 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_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_13.2: type = converted %int.make_type_signed, %.loc4_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param // CHECK:STDOUT: %a.loc4_9.1: %i32 = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc4_9.2 (constants.%a)] // CHECK:STDOUT: } @@ -93,7 +89,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc5: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] // CHECK:STDOUT: %int_1000.loc5: Core.IntLiteral = int_value 1000 [template = constants.%int_1000.1] -// CHECK:STDOUT: %impl.elem0.loc5: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc5: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc5: = bound_method %int_1000.loc5, %impl.elem0.loc5 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc5: = specific_function %Convert.bound.loc5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc5: init %i32 = call %Convert.specific_fn.loc5(%int_1000.loc5) [template = constants.%int_1000.2] @@ -109,7 +105,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc6: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] // CHECK:STDOUT: %int_1000.loc6: Core.IntLiteral = int_value 1000 [template = constants.%int_1000.1] -// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc6: = bound_method %int_1000.loc6, %impl.elem0.loc6 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc6: = specific_function %Convert.bound.loc6, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %Convert.specific_fn.loc6(%int_1000.loc6) [template = constants.%int_1000.2] @@ -128,7 +124,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.1 @@ -143,7 +139,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D @@ -170,22 +166,20 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %a: %i32 = bind_symbolic_name a, 0 [symbolic] // CHECK:STDOUT: %a.patt: %i32 = symbolic_binding_pattern a, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] // CHECK:STDOUT: %C.1: type = class_type @C, @C(%a) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %int_1000.1: Core.IntLiteral = int_value 1000 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1000.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1000.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1000.2: %i32 = int_value 1000 [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%int_1000.2) [template] @@ -201,7 +195,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -219,9 +213,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt.loc4_9.1, runtime_param [symbolic = %a.patt.loc4_9.2 (constants.%a.patt)] // CHECK:STDOUT: } { // 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_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_13.2: type = converted %int.make_type_signed, %.loc4_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param // CHECK:STDOUT: %a.loc4_9.1: %i32 = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc4_9.2 (constants.%a)] // CHECK:STDOUT: } @@ -231,7 +223,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] // CHECK:STDOUT: %int_1000: Core.IntLiteral = int_value 1000 [template = constants.%int_1000.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1000, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_1000) [template = constants.%int_1000.2] @@ -247,7 +239,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] // CHECK:STDOUT: %int_1000: Core.IntLiteral = int_value 1000 [template = constants.%int_1000.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1000, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_1000) [template = constants.%int_1000.2] @@ -266,7 +258,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.1 @@ -288,7 +280,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%.1 diff --git a/toolchain/check/testdata/class/todo_access_modifiers.carbon b/toolchain/check/testdata/class/todo_access_modifiers.carbon index 6a38d499b254..5ca3193059b6 100644 --- a/toolchain/check/testdata/class/todo_access_modifiers.carbon +++ b/toolchain/check/testdata/class/todo_access_modifiers.carbon @@ -28,17 +28,15 @@ class Access { // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Access.elem: type = unbound_element_type %Access, %i32 [template] // CHECK:STDOUT: %struct_type.k.l: type = struct_type {.k: %i32, .l: %i32} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.k.l [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.k.l [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -57,23 +55,19 @@ class Access { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} {} // CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%int_32.loc17) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_18.1: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_18.2: type = converted %int.make_type_signed.loc17, %.loc17_18.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_16: %Access.elem = field_decl k, element0 [template] +// CHECK:STDOUT: %i32.loc17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc17: %Access.elem = field_decl k, element0 [template] // 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_20.1: type = value_of_initializer %int.make_type_signed.loc19 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_20.2: type = converted %int.make_type_signed.loc19, %.loc19_20.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_18: %Access.elem = field_decl l, element1 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.k.l [template = constants.%complete_type] +// CHECK:STDOUT: %i32.loc19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc19: %Access.elem = field_decl l, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.k.l [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Access // CHECK:STDOUT: .F [private] = %F.decl // CHECK:STDOUT: .G [protected] = %G.decl -// CHECK:STDOUT: .k [private] = %.loc17_16 -// CHECK:STDOUT: .l [protected] = %.loc19_18 +// CHECK:STDOUT: .k [private] = %.loc17 +// CHECK:STDOUT: .l [protected] = %.loc19 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/virtual_modifiers.carbon b/toolchain/check/testdata/class/virtual_modifiers.carbon index e68d6da24948..2e9bca9f2075 100644 --- a/toolchain/check/testdata/class/virtual_modifiers.carbon +++ b/toolchain/check/testdata/class/virtual_modifiers.carbon @@ -500,33 +500,31 @@ class Derived { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Base: type = class_type @Base [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Base.elem: type = unbound_element_type %Base, %i32 [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %ptr.1: type = ptr_type [template] // CHECK:STDOUT: %struct_type.vptr.m1.m2: type = struct_type {.: %ptr.1, .m1: %i32, .m2: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.vptr.m1.m2 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.vptr.m1.m2 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %struct_type.m2.m1.1: type = struct_type {.m2: %i32, .m1: %i32} [template] // CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] // CHECK:STDOUT: %struct_type.m2.m1.2: type = struct_type {.m2: Core.IntLiteral, .m1: Core.IntLiteral} [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_5.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_4.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: } @@ -534,7 +532,7 @@ class Derived { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -553,22 +551,18 @@ class Derived { // CHECK:STDOUT: // CHECK:STDOUT: class @Base { // 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_11.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_11.2: type = converted %int.make_type_signed.loc5, %.loc5_11.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_9: %Base.elem = field_decl m1, element1 [template] +// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5: %Base.elem = field_decl m1, element1 [template] // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_11.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_11.2: type = converted %int.make_type_signed.loc6, %.loc6_11.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_9: %Base.elem = field_decl m2, element2 [template] +// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc6: %Base.elem = field_decl m2, element2 [template] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.vptr.m1.m2 [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.vptr.m1.m2 [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base -// CHECK:STDOUT: .m1 = %.loc5_9 -// CHECK:STDOUT: .m2 = %.loc6_9 +// CHECK:STDOUT: .m1 = %.loc5 +// CHECK:STDOUT: .m2 = %.loc6 // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } @@ -578,18 +572,16 @@ class Derived { // CHECK:STDOUT: fn @F.2() { // CHECK:STDOUT: !entry: // 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: %.loc12_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed, %.loc12_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %i.var: ref %i32 = var i // CHECK:STDOUT: %i: ref %i32 = bind_name i, %i.var // CHECK:STDOUT: %int_3.loc12: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12: = bound_method %int_3.loc12, %impl.elem0.loc12 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc12: = specific_function %Convert.bound.loc12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %Convert.specific_fn.loc12(%int_3.loc12) [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc12_17: init %i32 = converted %int_3.loc12, %int.convert_checked.loc12 [template = constants.%int_3.2] -// CHECK:STDOUT: assign %i.var, %.loc12_17 +// CHECK:STDOUT: %.loc12: init %i32 = converted %int_3.loc12, %int.convert_checked.loc12 [template = constants.%int_3.2] +// CHECK:STDOUT: assign %i.var, %.loc12 // CHECK:STDOUT: %Base.ref.loc14: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %b1.var: ref %Base = var b1 // CHECK:STDOUT: %b1: ref %Base = bind_name b1, %b1.var @@ -617,14 +609,14 @@ class Derived { // CHECK:STDOUT: %.loc15_35.2: ref %ptr.1 = class_element_access %b2.var, element0 // CHECK:STDOUT: %.loc15_35.3: ref %ptr.1 = vtable_ptr // CHECK:STDOUT: %.loc15_35.4: init %ptr.1 = initialize_from %.loc15_35.3 to %.loc15_35.2 -// CHECK:STDOUT: %impl.elem0.loc15_35.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc15_35.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc15_35.1: = bound_method %int_5, %impl.elem0.loc15_35.1 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc15_35.1: = specific_function %Convert.bound.loc15_35.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc15_35.1: init %i32 = call %Convert.specific_fn.loc15_35.1(%int_5) [template = constants.%int_5.2] // CHECK:STDOUT: %.loc15_35.5: init %i32 = converted %int_5, %int.convert_checked.loc15_35.1 [template = constants.%int_5.2] // CHECK:STDOUT: %.loc15_35.6: ref %i32 = class_element_access %b2.var, element2 // CHECK:STDOUT: %.loc15_35.7: init %i32 = initialize_from %.loc15_35.5 to %.loc15_35.6 [template = constants.%int_5.2] -// CHECK:STDOUT: %impl.elem0.loc15_35.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc15_35.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc15_35.2: = bound_method %int_3.loc15, %impl.elem0.loc15_35.2 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc15_35.2: = specific_function %Convert.bound.loc15_35.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc15_35.2: init %i32 = call %Convert.specific_fn.loc15_35.2(%int_3.loc15) [template = constants.%int_3.2] @@ -635,10 +627,10 @@ class Derived { // CHECK:STDOUT: %.loc15_36: init %Base = converted %.loc15_35.1, %.loc15_35.11 // CHECK:STDOUT: assign %b2.var, %.loc15_36 // CHECK:STDOUT: %b1.ref: ref %Base = name_ref b1, %b1 -// CHECK:STDOUT: %m2.ref: %Base.elem = name_ref m2, @Base.%.loc6_9 [template = @Base.%.loc6_9] +// CHECK:STDOUT: %m2.ref: %Base.elem = name_ref m2, @Base.%.loc6 [template = @Base.%.loc6] // CHECK:STDOUT: %.loc18_5: ref %i32 = class_element_access %b1.ref, element2 // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] -// CHECK:STDOUT: %impl.elem0.loc18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc18: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc18: = bound_method %int_4, %impl.elem0.loc18 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc18: = specific_function %Convert.bound.loc18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %Convert.specific_fn.loc18(%int_4) [template = constants.%int_4.2] diff --git a/toolchain/check/testdata/const/basic.carbon b/toolchain/check/testdata/const/basic.carbon index e3261af2b580..7d9ac7c06746 100644 --- a/toolchain/check/testdata/const/basic.carbon +++ b/toolchain/check/testdata/const/basic.carbon @@ -20,9 +20,7 @@ fn B(p: const (i32*)) -> const (i32*) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %const.1: type = const_type %i32 [template] // CHECK:STDOUT: %ptr.1: type = ptr_type %const.1 [template] // CHECK:STDOUT: %ptr.2: type = ptr_type %ptr.1 [template] @@ -36,7 +34,7 @@ fn B(p: const (i32*)) -> const (i32*) { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -56,16 +54,12 @@ fn B(p: const (i32*)) -> const (i32*) { // CHECK:STDOUT: %return.param_patt: %ptr.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc11_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_15: init type = call constants.%Int(%int_32.loc11_15) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed.loc11_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed.loc11_15, %.loc11_9.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %const.loc11_9: type = const_type %i32 [template = constants.%const.1] // CHECK:STDOUT: %ptr.loc11_18: type = ptr_type %const.1 [template = constants.%ptr.1] // CHECK:STDOUT: %ptr.loc11_19: type = ptr_type %ptr.1 [template = constants.%ptr.2] // CHECK:STDOUT: %int_32.loc11_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_31: init type = call constants.%Int(%int_32.loc11_31) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.1: type = value_of_initializer %int.make_type_signed.loc11_31 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.2: type = converted %int.make_type_signed.loc11_31, %.loc11_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_31: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %const.loc11_25: type = const_type %i32 [template = constants.%const.1] // CHECK:STDOUT: %ptr.loc11_34: type = ptr_type %const.1 [template = constants.%ptr.1] // CHECK:STDOUT: %ptr.loc11_35: type = ptr_type %ptr.1 [template = constants.%ptr.2] @@ -81,15 +75,11 @@ fn B(p: const (i32*)) -> const (i32*) { // CHECK:STDOUT: %return.param_patt: %const.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc15_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc15_16: init type = call constants.%Int(%int_32.loc15_16) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_19.1: type = value_of_initializer %int.make_type_signed.loc15_16 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_19.2: type = converted %int.make_type_signed.loc15_16, %.loc15_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc15_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ptr.loc15_19: type = ptr_type %i32 [template = constants.%ptr.3] // CHECK:STDOUT: %const.loc15_9: type = const_type %ptr.3 [template = constants.%const.2] // CHECK:STDOUT: %int_32.loc15_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc15_33: init type = call constants.%Int(%int_32.loc15_33) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_36.1: type = value_of_initializer %int.make_type_signed.loc15_33 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_36.2: type = converted %int.make_type_signed.loc15_33, %.loc15_36.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc15_33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ptr.loc15_36: type = ptr_type %i32 [template = constants.%ptr.3] // CHECK:STDOUT: %const.loc15_26: type = const_type %ptr.3 [template = constants.%const.2] // CHECK:STDOUT: %p.param: %const.2 = value_param runtime_param0 diff --git a/toolchain/check/testdata/const/collapse.carbon b/toolchain/check/testdata/const/collapse.carbon index c6666ec4adbc..78a508b4f57c 100644 --- a/toolchain/check/testdata/const/collapse.carbon +++ b/toolchain/check/testdata/const/collapse.carbon @@ -20,9 +20,7 @@ fn F(p: const i32**) -> const (const i32)** { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %const: type = const_type %i32 [template] // CHECK:STDOUT: %ptr.1: type = ptr_type %const [template] // CHECK:STDOUT: %ptr.2: type = ptr_type %ptr.1 [template] @@ -32,7 +30,7 @@ fn F(p: const i32**) -> const (const i32)** { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -51,16 +49,12 @@ fn F(p: const i32**) -> const (const i32)** { // CHECK:STDOUT: %return.param_patt: %ptr.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc15_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc15_15: init type = call constants.%Int(%int_32.loc15_15) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_9.1: type = value_of_initializer %int.make_type_signed.loc15_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_9.2: type = converted %int.make_type_signed.loc15_15, %.loc15_9.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc15_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %const.loc15_9: type = const_type %i32 [template = constants.%const] // CHECK:STDOUT: %ptr.loc15_18: type = ptr_type %const [template = constants.%ptr.1] // CHECK:STDOUT: %ptr.loc15_19: type = ptr_type %ptr.1 [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: %i32.loc15_38: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %const.loc15_32: type = const_type %i32 [template = constants.%const] // CHECK:STDOUT: %const.loc15_25: type = const_type %const [template = constants.%const] // CHECK:STDOUT: %ptr.loc15_42: type = ptr_type %const [template = constants.%ptr.1] diff --git a/toolchain/check/testdata/const/fail_collapse.carbon b/toolchain/check/testdata/const/fail_collapse.carbon index 9cffd7c0824d..9a2ca3f3f0e8 100644 --- a/toolchain/check/testdata/const/fail_collapse.carbon +++ b/toolchain/check/testdata/const/fail_collapse.carbon @@ -26,9 +26,7 @@ fn G(p: const (const i32)**) -> i32** { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %const: type = const_type %i32 [template] // CHECK:STDOUT: %ptr.1: type = ptr_type %const [template] // CHECK:STDOUT: %ptr.2: type = ptr_type %ptr.1 [template] @@ -41,7 +39,7 @@ fn G(p: const (const i32)**) -> i32** { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -60,17 +58,13 @@ fn G(p: const (const i32)**) -> i32** { // CHECK:STDOUT: %return.param_patt: %ptr.4 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // 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: %i32.loc15_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %const.loc15_16: type = const_type %i32 [template = constants.%const] // CHECK:STDOUT: %const.loc15_9: type = const_type %const [template = constants.%const] // CHECK:STDOUT: %ptr.loc15_26: type = ptr_type %const [template = constants.%ptr.1] // CHECK:STDOUT: %ptr.loc15_27: type = ptr_type %ptr.1 [template = constants.%ptr.2] // CHECK:STDOUT: %int_32.loc15_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc15_33: init type = call constants.%Int(%int_32.loc15_33) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_36.1: type = value_of_initializer %int.make_type_signed.loc15_33 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_36.2: type = converted %int.make_type_signed.loc15_33, %.loc15_36.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc15_33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ptr.loc15_36: type = ptr_type %i32 [template = constants.%ptr.3] // CHECK:STDOUT: %ptr.loc15_37: type = ptr_type %ptr.3 [template = constants.%ptr.4] // CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 diff --git a/toolchain/check/testdata/const/import.carbon b/toolchain/check/testdata/const/import.carbon index 07a9930fc1cc..6542ef866492 100644 --- a/toolchain/check/testdata/const/import.carbon +++ b/toolchain/check/testdata/const/import.carbon @@ -30,9 +30,7 @@ var a_ptr: const i32* = a_ptr_ref; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %const: type = const_type %i32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] @@ -41,7 +39,7 @@ var a_ptr: const i32* = a_ptr_ref; // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -60,24 +58,18 @@ var a_ptr: const i32* = a_ptr_ref; // CHECK:STDOUT: %return.param_patt: %const = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %const: type = const_type %i32 [template = constants.%const] // CHECK:STDOUT: %return.param: ref %const = out_param runtime_param0 // CHECK:STDOUT: %return: ref %const = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_12.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_12.2: type = converted %int.make_type_signed.loc6, %.loc6_12.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %const.loc6: type = const_type %i32 [template = constants.%const] // CHECK:STDOUT: %a_ref.var: ref %const = var a_ref // CHECK:STDOUT: %a_ref: ref %const = bind_name a_ref, %a_ref.var // CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_16.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_16.2: type = converted %int.make_type_signed.loc7, %.loc7_16.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %const.loc7: type = const_type %i32 [template = constants.%const] // CHECK:STDOUT: %ptr: type = ptr_type %const [template = constants.%ptr] // CHECK:STDOUT: %a_ptr_ref.var: ref %ptr = var a_ptr_ref @@ -101,9 +93,7 @@ var a_ptr: const i32* = a_ptr_ref; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %const: type = const_type %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %const [template] // CHECK:STDOUT: } @@ -132,17 +122,13 @@ var a_ptr: const i32* = a_ptr_ref; // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_signed.loc6, %.loc6_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %const.loc6: type = const_type %i32 [template = constants.%const] // CHECK:STDOUT: %ptr.loc6: type = ptr_type %const [template = constants.%ptr] // CHECK:STDOUT: %a.var: ref %ptr = var a // CHECK:STDOUT: %a: ref %ptr = bind_name a, %a.var // CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_12.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_12.2: type = converted %int.make_type_signed.loc7, %.loc7_12.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %const.loc7: type = const_type %i32 [template = constants.%const] // CHECK:STDOUT: %ptr.loc7: type = ptr_type %const [template = constants.%ptr] // CHECK:STDOUT: %a_ptr.var: ref %ptr = var a_ptr diff --git a/toolchain/check/testdata/deduce/array.carbon b/toolchain/check/testdata/deduce/array.carbon index 598049b5ebcd..7d54e8d6624a 100644 --- a/toolchain/check/testdata/deduce/array.carbon +++ b/toolchain/check/testdata/deduce/array.carbon @@ -113,14 +113,12 @@ fn G() -> C { // CHECK:STDOUT: %require_complete.2: = require_complete_type %array_type.1 [symbolic] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] @@ -132,13 +130,13 @@ fn G() -> C { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %array: %array_type.2 = tuple_value (%C.val, %C.val, %C.val) [template] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%C) [template] -// CHECK:STDOUT: %complete_type.4: = complete_type_witness %array_type.2 [template] +// CHECK:STDOUT: %complete_type.5: = complete_type_witness %array_type.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -204,19 +202,17 @@ fn G() -> C { // CHECK:STDOUT: %a.ref: @F.%array_type.loc6_24.2 (%array_type.1) = name_ref a, %a // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // 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: %.loc6_44.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc6_44.2: type = converted %int.make_type_signed, %.loc6_44.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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: %.loc6_43.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] // CHECK:STDOUT: %.loc6_43.2: %i32 = converted %int_0, %.loc6_43.1 [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc6_44.3: ref @F.%array_type.loc6_24.2 (%array_type.1) = value_as_ref %a.ref -// CHECK:STDOUT: %.loc6_44.4: ref @F.%T.loc6_6.2 (%T) = array_index %.loc6_44.3, %.loc6_43.2 -// CHECK:STDOUT: %.loc6_44.5: @F.%T.loc6_6.2 (%T) = bind_value %.loc6_44.4 -// CHECK:STDOUT: return %.loc6_44.5 +// CHECK:STDOUT: %.loc6_44.1: ref @F.%array_type.loc6_24.2 (%array_type.1) = value_as_ref %a.ref +// CHECK:STDOUT: %.loc6_44.2: ref @F.%T.loc6_6.2 (%T) = array_index %.loc6_44.1, %.loc6_43.2 +// CHECK:STDOUT: %.loc6_44.3: @F.%T.loc6_6.2 (%T) = bind_value %.loc6_44.2 +// CHECK:STDOUT: return %.loc6_44.3 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -268,7 +264,7 @@ fn G() -> C { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc6_27 => constants.%complete_type.1 -// CHECK:STDOUT: %require_complete.loc6_17 => constants.%complete_type.4 +// CHECK:STDOUT: %require_complete.loc6_17 => constants.%complete_type.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_bound_only.carbon @@ -278,18 +274,16 @@ fn G() -> C { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [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, %int_32 [template] -// CHECK:STDOUT: %N.1: %i32 = bind_symbolic_name N, 0 [symbolic] -// CHECK:STDOUT: %N.patt.1: %i32 = symbolic_binding_pattern N, 0 [symbolic] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %N.2: %i32 = bind_symbolic_name N, 0 [symbolic] +// CHECK:STDOUT: %N.patt.2: %i32 = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.13) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %N.1, %Convert.13 [symbolic] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.4(%int_32) [symbolic] -// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %Convert.specific_fn(%N.1) [symbolic] +// CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.9) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %N.2, %Convert.9 [symbolic] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.3(%int_32) [symbolic] +// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %Convert.specific_fn(%N.2) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] @@ -307,7 +301,7 @@ fn G() -> C { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -323,32 +317,28 @@ fn G() -> C { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %N.patt.loc10_6.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc10_6.2 (constants.%N.patt.1)] -// CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc10_6.1, runtime_param [symbolic = %N.patt.loc10_6.2 (constants.%N.patt.1)] +// CHECK:STDOUT: %N.patt.loc10_6.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc10_6.2 (constants.%N.patt.2)] +// CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc10_6.1, runtime_param [symbolic = %N.patt.loc10_6.2 (constants.%N.patt.2)] // CHECK:STDOUT: %a.patt: = binding_pattern a // CHECK:STDOUT: %a.param_patt: = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc10_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc10_10: init type = call constants.%Int(%int_32.loc10_10) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_10.1: type = value_of_initializer %int.make_type_signed.loc10_10 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_10.2: type = converted %int.make_type_signed.loc10_10, %.loc10_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc10_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %N.ref.loc10_22: %i32 = name_ref N, %N.loc10_6.1 [symbolic = %N.loc10_6.2 (constants.%N.1)] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.13] +// CHECK:STDOUT: %N.ref.loc10_22: %i32 = name_ref N, %N.loc10_6.1 [symbolic = %N.loc10_6.2 (constants.%N.2)] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.9] // CHECK:STDOUT: %Convert.bound.loc10_22.1: = bound_method %N.ref.loc10_22, %impl.elem0 [symbolic = %Convert.bound.loc10_22.2 (constants.%Convert.bound)] -// CHECK:STDOUT: %Convert.specific_fn.loc10_22.1: = specific_function %Convert.bound.loc10_22.1, @Convert.4(constants.%int_32) [symbolic = %Convert.specific_fn.loc10_22.2 (constants.%Convert.specific_fn)] +// CHECK:STDOUT: %Convert.specific_fn.loc10_22.1: = specific_function %Convert.bound.loc10_22.1, @Convert.3(constants.%int_32) [symbolic = %Convert.specific_fn.loc10_22.2 (constants.%Convert.specific_fn)] // CHECK:STDOUT: %int.convert_checked.loc10_22.1: init Core.IntLiteral = call %Convert.specific_fn.loc10_22.1(%N.ref.loc10_22) [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] // CHECK:STDOUT: %.loc10_22.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc10_22.1 [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] // CHECK:STDOUT: %.loc10_22.2: Core.IntLiteral = converted %N.ref.loc10_22, %.loc10_22.1 [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] // CHECK:STDOUT: %array_type: type = array_type %.loc10_22.2, %C [template = ] // CHECK:STDOUT: %int_32.loc10_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc10_29: init type = call constants.%Int(%int_32.loc10_29) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_29.1: type = value_of_initializer %int.make_type_signed.loc10_29 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_29.2: type = converted %int.make_type_signed.loc10_29, %.loc10_29.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc10_29: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param -// CHECK:STDOUT: %N.loc10_6.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc10_6.2 (constants.%N.1)] +// CHECK:STDOUT: %N.loc10_6.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc10_6.2 (constants.%N.2)] // CHECK:STDOUT: %a.param: = value_param runtime_param0 // CHECK:STDOUT: %a: = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -373,17 +363,17 @@ fn G() -> C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%N.loc10_6.1: %i32) { -// CHECK:STDOUT: %N.loc10_6.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc10_6.2 (constants.%N.1)] -// CHECK:STDOUT: %N.patt.loc10_6.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc10_6.2 (constants.%N.patt.1)] -// CHECK:STDOUT: %Convert.bound.loc10_22.2: = bound_method %N.loc10_6.2, constants.%Convert.13 [symbolic = %Convert.bound.loc10_22.2 (constants.%Convert.bound)] -// CHECK:STDOUT: %Convert.specific_fn.loc10_22.2: = specific_function %Convert.bound.loc10_22.2, @Convert.4(constants.%int_32) [symbolic = %Convert.specific_fn.loc10_22.2 (constants.%Convert.specific_fn)] +// CHECK:STDOUT: %N.loc10_6.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc10_6.2 (constants.%N.2)] +// CHECK:STDOUT: %N.patt.loc10_6.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc10_6.2 (constants.%N.patt.2)] +// CHECK:STDOUT: %Convert.bound.loc10_22.2: = bound_method %N.loc10_6.2, constants.%Convert.9 [symbolic = %Convert.bound.loc10_22.2 (constants.%Convert.bound)] +// CHECK:STDOUT: %Convert.specific_fn.loc10_22.2: = specific_function %Convert.bound.loc10_22.2, @Convert.3(constants.%int_32) [symbolic = %Convert.specific_fn.loc10_22.2 (constants.%Convert.specific_fn)] // CHECK:STDOUT: %int.convert_checked.loc10_22.2: init Core.IntLiteral = call %Convert.specific_fn.loc10_22.2(%N.loc10_6.2) [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: fn[%N.param_patt: %i32](%a.param_patt: ) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %N.ref.loc10_42: %i32 = name_ref N, %N.loc10_6.1 [symbolic = %N.loc10_6.2 (constants.%N.1)] +// CHECK:STDOUT: %N.ref.loc10_42: %i32 = name_ref N, %N.loc10_6.1 [symbolic = %N.loc10_6.2 (constants.%N.2)] // CHECK:STDOUT: return %N.ref.loc10_42 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -419,9 +409,9 @@ fn G() -> C { // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%N.1) { -// CHECK:STDOUT: %N.loc10_6.2 => constants.%N.1 -// CHECK:STDOUT: %N.patt.loc10_6.2 => constants.%N.1 +// CHECK:STDOUT: specific @F(constants.%N.2) { +// CHECK:STDOUT: %N.loc10_6.2 => constants.%N.2 +// CHECK:STDOUT: %N.patt.loc10_6.2 => constants.%N.2 // CHECK:STDOUT: %Convert.bound.loc10_22.2 => constants.%Convert.bound // CHECK:STDOUT: %Convert.specific_fn.loc10_22.2 => constants.%Convert.specific_fn // CHECK:STDOUT: %int.convert_checked.loc10_22.2 => constants.%int.convert_checked @@ -436,18 +426,16 @@ fn G() -> C { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %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, %int_32 [template] -// CHECK:STDOUT: %N.1: %i32 = bind_symbolic_name N, 1 [symbolic] -// CHECK:STDOUT: %N.patt.1: %i32 = symbolic_binding_pattern N, 1 [symbolic] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %N.2: %i32 = bind_symbolic_name N, 1 [symbolic] +// CHECK:STDOUT: %N.patt.2: %i32 = symbolic_binding_pattern N, 1 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.13) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %N.1, %Convert.13 [symbolic] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.4(%int_32) [symbolic] -// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %Convert.specific_fn(%N.1) [symbolic] +// CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.9) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %N.2, %Convert.9 [symbolic] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.3(%int_32) [symbolic] +// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %Convert.specific_fn(%N.2) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] @@ -465,7 +453,7 @@ fn G() -> C { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -483,22 +471,20 @@ fn G() -> C { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.patt.loc10_6.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_6.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc10_6.1, runtime_param [symbolic = %T.patt.loc10_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %N.patt.loc10_16.1: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc10_16.2 (constants.%N.patt.1)] -// CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc10_16.1, runtime_param [symbolic = %N.patt.loc10_16.2 (constants.%N.patt.1)] +// CHECK:STDOUT: %N.patt.loc10_16.1: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc10_16.2 (constants.%N.patt.2)] +// CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc10_16.1, runtime_param [symbolic = %N.patt.loc10_16.2 (constants.%N.patt.2)] // CHECK:STDOUT: %a.patt: = binding_pattern a // CHECK:STDOUT: %a.param_patt: = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %return.patt: @F.%T.loc10_6.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.%T.loc10_6.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // 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: %.loc10_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc10_20.2: type = converted %int.make_type_signed, %.loc10_20.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %T.ref.loc10_29: type = name_ref T, %T.loc10_6.1 [symbolic = %T.loc10_6.2 (constants.%T)] -// CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc10_16.1 [symbolic = %N.loc10_16.2 (constants.%N.1)] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.13] +// CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc10_16.1 [symbolic = %N.loc10_16.2 (constants.%N.2)] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.9] // CHECK:STDOUT: %Convert.bound.loc10_32.1: = bound_method %N.ref, %impl.elem0 [symbolic = %Convert.bound.loc10_32.2 (constants.%Convert.bound)] -// CHECK:STDOUT: %Convert.specific_fn.loc10_32.1: = specific_function %Convert.bound.loc10_32.1, @Convert.4(constants.%int_32) [symbolic = %Convert.specific_fn.loc10_32.2 (constants.%Convert.specific_fn)] +// CHECK:STDOUT: %Convert.specific_fn.loc10_32.1: = specific_function %Convert.bound.loc10_32.1, @Convert.3(constants.%int_32) [symbolic = %Convert.specific_fn.loc10_32.2 (constants.%Convert.specific_fn)] // CHECK:STDOUT: %int.convert_checked.loc10_32.1: init Core.IntLiteral = call %Convert.specific_fn.loc10_32.1(%N.ref) [symbolic = %int.convert_checked.loc10_32.2 (constants.%int.convert_checked)] // CHECK:STDOUT: %.loc10_32.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc10_32.1 [symbolic = %int.convert_checked.loc10_32.2 (constants.%int.convert_checked)] // CHECK:STDOUT: %.loc10_32.2: Core.IntLiteral = converted %N.ref, %.loc10_32.1 [symbolic = %int.convert_checked.loc10_32.2 (constants.%int.convert_checked)] @@ -507,7 +493,7 @@ fn G() -> C { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc10_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc10_6.2 (constants.%T)] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param -// CHECK:STDOUT: %N.loc10_16.1: %i32 = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc10_16.2 (constants.%N.1)] +// CHECK:STDOUT: %N.loc10_16.1: %i32 = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc10_16.2 (constants.%N.2)] // CHECK:STDOUT: %a.param: = value_param runtime_param0 // CHECK:STDOUT: %a: = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref @F.%T.loc10_6.2 (%T) = out_param runtime_param1 @@ -534,10 +520,10 @@ fn G() -> C { // CHECK:STDOUT: generic fn @F(%T.loc10_6.1: type, %N.loc10_16.1: %i32) { // CHECK:STDOUT: %T.loc10_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc10_6.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc10_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %N.loc10_16.2: %i32 = bind_symbolic_name N, 1 [symbolic = %N.loc10_16.2 (constants.%N.1)] -// CHECK:STDOUT: %N.patt.loc10_16.2: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc10_16.2 (constants.%N.patt.1)] -// CHECK:STDOUT: %Convert.bound.loc10_32.2: = bound_method %N.loc10_16.2, constants.%Convert.13 [symbolic = %Convert.bound.loc10_32.2 (constants.%Convert.bound)] -// CHECK:STDOUT: %Convert.specific_fn.loc10_32.2: = specific_function %Convert.bound.loc10_32.2, @Convert.4(constants.%int_32) [symbolic = %Convert.specific_fn.loc10_32.2 (constants.%Convert.specific_fn)] +// CHECK:STDOUT: %N.loc10_16.2: %i32 = bind_symbolic_name N, 1 [symbolic = %N.loc10_16.2 (constants.%N.2)] +// CHECK:STDOUT: %N.patt.loc10_16.2: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc10_16.2 (constants.%N.patt.2)] +// CHECK:STDOUT: %Convert.bound.loc10_32.2: = bound_method %N.loc10_16.2, constants.%Convert.9 [symbolic = %Convert.bound.loc10_32.2 (constants.%Convert.bound)] +// CHECK:STDOUT: %Convert.specific_fn.loc10_32.2: = specific_function %Convert.bound.loc10_32.2, @Convert.3(constants.%int_32) [symbolic = %Convert.specific_fn.loc10_32.2 (constants.%Convert.specific_fn)] // CHECK:STDOUT: %int.convert_checked.loc10_32.2: init Core.IntLiteral = call %Convert.specific_fn.loc10_32.2(%N.loc10_16.2) [symbolic = %int.convert_checked.loc10_32.2 (constants.%int.convert_checked)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%T.param_patt: type, %N.param_patt: %i32](%a.param_patt: ) -> @F.%T.loc10_6.2 (%T); @@ -574,11 +560,11 @@ fn G() -> C { // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T, constants.%N.1) { +// CHECK:STDOUT: specific @F(constants.%T, constants.%N.2) { // CHECK:STDOUT: %T.loc10_6.2 => constants.%T // CHECK:STDOUT: %T.patt.loc10_6.2 => constants.%T -// CHECK:STDOUT: %N.loc10_16.2 => constants.%N.1 -// CHECK:STDOUT: %N.patt.loc10_16.2 => constants.%N.1 +// CHECK:STDOUT: %N.loc10_16.2 => constants.%N.2 +// CHECK:STDOUT: %N.patt.loc10_16.2 => constants.%N.2 // CHECK:STDOUT: %Convert.bound.loc10_32.2 => constants.%Convert.bound // CHECK:STDOUT: %Convert.specific_fn.loc10_32.2 => constants.%Convert.specific_fn // CHECK:STDOUT: %int.convert_checked.loc10_32.2 => constants.%int.convert_checked @@ -600,14 +586,12 @@ fn G() -> C { // CHECK:STDOUT: %require_complete.2: = require_complete_type %array_type.1 [symbolic] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] @@ -620,13 +604,13 @@ fn G() -> C { // CHECK:STDOUT: %array: %array_type.2 = tuple_value (%C.val, %C.val, %C.val) [template] // CHECK:STDOUT: %array_type.3: type = array_type %int_2, %C [template] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%C) [template] -// CHECK:STDOUT: %complete_type.4: = complete_type_witness %array_type.3 [template] +// CHECK:STDOUT: %complete_type.5: = complete_type_witness %array_type.3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -692,19 +676,17 @@ fn G() -> C { // CHECK:STDOUT: %a.ref: @F.%array_type.loc6_24.2 (%array_type.1) = name_ref a, %a // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // 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: %.loc6_44.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc6_44.2: type = converted %int.make_type_signed, %.loc6_44.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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: %.loc6_43.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] // CHECK:STDOUT: %.loc6_43.2: %i32 = converted %int_0, %.loc6_43.1 [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc6_44.3: ref @F.%array_type.loc6_24.2 (%array_type.1) = value_as_ref %a.ref -// CHECK:STDOUT: %.loc6_44.4: ref @F.%T.loc6_6.2 (%T) = array_index %.loc6_44.3, %.loc6_43.2 -// CHECK:STDOUT: %.loc6_44.5: @F.%T.loc6_6.2 (%T) = bind_value %.loc6_44.4 -// CHECK:STDOUT: return %.loc6_44.5 +// CHECK:STDOUT: %.loc6_44.1: ref @F.%array_type.loc6_24.2 (%array_type.1) = value_as_ref %a.ref +// CHECK:STDOUT: %.loc6_44.2: ref @F.%T.loc6_6.2 (%T) = array_index %.loc6_44.1, %.loc6_43.2 +// CHECK:STDOUT: %.loc6_44.3: @F.%T.loc6_6.2 (%T) = bind_value %.loc6_44.2 +// CHECK:STDOUT: return %.loc6_44.3 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -756,7 +738,7 @@ fn G() -> C { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc6_27 => constants.%complete_type.1 -// CHECK:STDOUT: %require_complete.loc6_17 => constants.%complete_type.4 +// CHECK:STDOUT: %require_complete.loc6_17 => constants.%complete_type.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_type_mismatch.carbon @@ -767,18 +749,16 @@ fn G() -> C { // CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %D: type = class_type @D [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, %int_32 [template] -// CHECK:STDOUT: %N.1: %i32 = bind_symbolic_name N, 0 [symbolic] -// CHECK:STDOUT: %N.patt.1: %i32 = symbolic_binding_pattern N, 0 [symbolic] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %N.2: %i32 = bind_symbolic_name N, 0 [symbolic] +// CHECK:STDOUT: %N.patt.2: %i32 = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.13) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %N.1, %Convert.13 [symbolic] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.4(%int_32) [symbolic] -// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %Convert.specific_fn(%N.1) [symbolic] +// CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.9) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %N.2, %Convert.9 [symbolic] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.3(%int_32) [symbolic] +// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %Convert.specific_fn(%N.2) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] @@ -796,7 +776,7 @@ fn G() -> C { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -814,32 +794,28 @@ fn G() -> C { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %N.patt.loc10_6.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc10_6.2 (constants.%N.patt.1)] -// CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc10_6.1, runtime_param [symbolic = %N.patt.loc10_6.2 (constants.%N.patt.1)] +// CHECK:STDOUT: %N.patt.loc10_6.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc10_6.2 (constants.%N.patt.2)] +// CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc10_6.1, runtime_param [symbolic = %N.patt.loc10_6.2 (constants.%N.patt.2)] // CHECK:STDOUT: %a.patt: = binding_pattern a // CHECK:STDOUT: %a.param_patt: = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc10_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc10_10: init type = call constants.%Int(%int_32.loc10_10) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_10.1: type = value_of_initializer %int.make_type_signed.loc10_10 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_10.2: type = converted %int.make_type_signed.loc10_10, %.loc10_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc10_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %N.ref.loc10_22: %i32 = name_ref N, %N.loc10_6.1 [symbolic = %N.loc10_6.2 (constants.%N.1)] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.13] +// CHECK:STDOUT: %N.ref.loc10_22: %i32 = name_ref N, %N.loc10_6.1 [symbolic = %N.loc10_6.2 (constants.%N.2)] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.9] // CHECK:STDOUT: %Convert.bound.loc10_22.1: = bound_method %N.ref.loc10_22, %impl.elem0 [symbolic = %Convert.bound.loc10_22.2 (constants.%Convert.bound)] -// CHECK:STDOUT: %Convert.specific_fn.loc10_22.1: = specific_function %Convert.bound.loc10_22.1, @Convert.4(constants.%int_32) [symbolic = %Convert.specific_fn.loc10_22.2 (constants.%Convert.specific_fn)] +// CHECK:STDOUT: %Convert.specific_fn.loc10_22.1: = specific_function %Convert.bound.loc10_22.1, @Convert.3(constants.%int_32) [symbolic = %Convert.specific_fn.loc10_22.2 (constants.%Convert.specific_fn)] // CHECK:STDOUT: %int.convert_checked.loc10_22.1: init Core.IntLiteral = call %Convert.specific_fn.loc10_22.1(%N.ref.loc10_22) [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] // CHECK:STDOUT: %.loc10_22.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc10_22.1 [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] // CHECK:STDOUT: %.loc10_22.2: Core.IntLiteral = converted %N.ref.loc10_22, %.loc10_22.1 [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] // CHECK:STDOUT: %array_type: type = array_type %.loc10_22.2, %C [template = ] // CHECK:STDOUT: %int_32.loc10_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc10_29: init type = call constants.%Int(%int_32.loc10_29) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_29.1: type = value_of_initializer %int.make_type_signed.loc10_29 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_29.2: type = converted %int.make_type_signed.loc10_29, %.loc10_29.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc10_29: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param -// CHECK:STDOUT: %N.loc10_6.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc10_6.2 (constants.%N.1)] +// CHECK:STDOUT: %N.loc10_6.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc10_6.2 (constants.%N.2)] // CHECK:STDOUT: %a.param: = value_param runtime_param0 // CHECK:STDOUT: %a: = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -872,17 +848,17 @@ fn G() -> C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%N.loc10_6.1: %i32) { -// CHECK:STDOUT: %N.loc10_6.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc10_6.2 (constants.%N.1)] -// CHECK:STDOUT: %N.patt.loc10_6.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc10_6.2 (constants.%N.patt.1)] -// CHECK:STDOUT: %Convert.bound.loc10_22.2: = bound_method %N.loc10_6.2, constants.%Convert.13 [symbolic = %Convert.bound.loc10_22.2 (constants.%Convert.bound)] -// CHECK:STDOUT: %Convert.specific_fn.loc10_22.2: = specific_function %Convert.bound.loc10_22.2, @Convert.4(constants.%int_32) [symbolic = %Convert.specific_fn.loc10_22.2 (constants.%Convert.specific_fn)] +// CHECK:STDOUT: %N.loc10_6.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc10_6.2 (constants.%N.2)] +// CHECK:STDOUT: %N.patt.loc10_6.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc10_6.2 (constants.%N.patt.2)] +// CHECK:STDOUT: %Convert.bound.loc10_22.2: = bound_method %N.loc10_6.2, constants.%Convert.9 [symbolic = %Convert.bound.loc10_22.2 (constants.%Convert.bound)] +// CHECK:STDOUT: %Convert.specific_fn.loc10_22.2: = specific_function %Convert.bound.loc10_22.2, @Convert.3(constants.%int_32) [symbolic = %Convert.specific_fn.loc10_22.2 (constants.%Convert.specific_fn)] // CHECK:STDOUT: %int.convert_checked.loc10_22.2: init Core.IntLiteral = call %Convert.specific_fn.loc10_22.2(%N.loc10_6.2) [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: fn[%N.param_patt: %i32](%a.param_patt: ) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %N.ref.loc10_42: %i32 = name_ref N, %N.loc10_6.1 [symbolic = %N.loc10_6.2 (constants.%N.1)] +// CHECK:STDOUT: %N.ref.loc10_42: %i32 = name_ref N, %N.loc10_6.1 [symbolic = %N.loc10_6.2 (constants.%N.2)] // CHECK:STDOUT: return %N.ref.loc10_42 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -918,9 +894,9 @@ fn G() -> C { // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%N.1) { -// CHECK:STDOUT: %N.loc10_6.2 => constants.%N.1 -// CHECK:STDOUT: %N.patt.loc10_6.2 => constants.%N.1 +// CHECK:STDOUT: specific @F(constants.%N.2) { +// CHECK:STDOUT: %N.loc10_6.2 => constants.%N.2 +// CHECK:STDOUT: %N.patt.loc10_6.2 => constants.%N.2 // CHECK:STDOUT: %Convert.bound.loc10_22.2 => constants.%Convert.bound // CHECK:STDOUT: %Convert.specific_fn.loc10_22.2 => constants.%Convert.specific_fn // CHECK:STDOUT: %int.convert_checked.loc10_22.2 => constants.%int.convert_checked diff --git a/toolchain/check/testdata/deduce/generic_type.carbon b/toolchain/check/testdata/deduce/generic_type.carbon index bca8f464f5c1..12e4bd39d9d3 100644 --- a/toolchain/check/testdata/deduce/generic_type.carbon +++ b/toolchain/check/testdata/deduce/generic_type.carbon @@ -757,27 +757,25 @@ fn G() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %N.1: %i32 = bind_symbolic_name N, 0 [symbolic] -// CHECK:STDOUT: %N.patt.1: %i32 = symbolic_binding_pattern N, 0 [symbolic] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %N.2: %i32 = bind_symbolic_name N, 0 [symbolic] +// CHECK:STDOUT: %N.patt.2: %i32 = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %WithNontype.type: type = generic_class_type @WithNontype [template] // CHECK:STDOUT: %WithNontype.generic: %WithNontype.type = struct_value () [template] -// CHECK:STDOUT: %WithNontype.1: type = class_type @WithNontype, @WithNontype(%N.1) [symbolic] +// CHECK:STDOUT: %WithNontype.1: type = class_type @WithNontype, @WithNontype(%N.2) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %require_complete.1: = require_complete_type %WithNontype.1 [symbolic] +// CHECK:STDOUT: %require_complete.2: = require_complete_type %WithNontype.1 [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %WithNontype.2: type = class_type @WithNontype, @WithNontype(%int_0.2) [template] @@ -788,7 +786,7 @@ fn G() -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -803,37 +801,31 @@ fn G() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %WithNontype.decl: %WithNontype.type = class_decl @WithNontype [template = constants.%WithNontype.generic] { -// CHECK:STDOUT: %N.patt.loc4_19.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_19.2 (constants.%N.patt.1)] -// CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc4_19.1, runtime_param [symbolic = %N.patt.loc4_19.2 (constants.%N.patt.1)] +// CHECK:STDOUT: %N.patt.loc4_19.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_19.2 (constants.%N.patt.2)] +// CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc4_19.1, runtime_param [symbolic = %N.patt.loc4_19.2 (constants.%N.patt.2)] // CHECK:STDOUT: } { // 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_23.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_23.2: type = converted %int.make_type_signed, %.loc4_23.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param -// CHECK:STDOUT: %N.loc4_19.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc4_19.2 (constants.%N.1)] +// CHECK:STDOUT: %N.loc4_19.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc4_19.2 (constants.%N.2)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %N.patt.loc6_6.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_6.2 (constants.%N.patt.1)] -// CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc6_6.1, runtime_param [symbolic = %N.patt.loc6_6.2 (constants.%N.patt.1)] +// CHECK:STDOUT: %N.patt.loc6_6.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_6.2 (constants.%N.patt.2)] +// CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc6_6.1, runtime_param [symbolic = %N.patt.loc6_6.2 (constants.%N.patt.2)] // CHECK:STDOUT: %x.patt: @F.%WithNontype.loc6_31.2 (%WithNontype.1) = binding_pattern x // CHECK:STDOUT: %x.param_patt: @F.%WithNontype.loc6_31.2 (%WithNontype.1) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc6_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_10: init type = call constants.%Int(%int_32.loc6_10) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.1: type = value_of_initializer %int.make_type_signed.loc6_10 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.2: type = converted %int.make_type_signed.loc6_10, %.loc6_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %WithNontype.ref: %WithNontype.type = name_ref WithNontype, file.%WithNontype.decl [template = constants.%WithNontype.generic] -// CHECK:STDOUT: %N.ref.loc6_30: %i32 = name_ref N, %N.loc6_6.1 [symbolic = %N.loc6_6.2 (constants.%N.1)] -// CHECK:STDOUT: %WithNontype.loc6_31.1: type = class_type @WithNontype, @WithNontype(constants.%N.1) [symbolic = %WithNontype.loc6_31.2 (constants.%WithNontype.1)] +// CHECK:STDOUT: %N.ref.loc6_30: %i32 = name_ref N, %N.loc6_6.1 [symbolic = %N.loc6_6.2 (constants.%N.2)] +// CHECK:STDOUT: %WithNontype.loc6_31.1: type = class_type @WithNontype, @WithNontype(constants.%N.2) [symbolic = %WithNontype.loc6_31.2 (constants.%WithNontype.1)] // CHECK:STDOUT: %int_32.loc6_37: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_37: init type = call constants.%Int(%int_32.loc6_37) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_37.1: type = value_of_initializer %int.make_type_signed.loc6_37 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_37.2: type = converted %int.make_type_signed.loc6_37, %.loc6_37.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6_37: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param -// CHECK:STDOUT: %N.loc6_6.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc6_6.2 (constants.%N.1)] +// CHECK:STDOUT: %N.loc6_6.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc6_6.2 (constants.%N.2)] // CHECK:STDOUT: %x.param: @F.%WithNontype.loc6_31.2 (%WithNontype.1) = value_param runtime_param0 // CHECK:STDOUT: %x: @F.%WithNontype.loc6_31.2 (%WithNontype.1) = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -844,22 +836,20 @@ fn G() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc8_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_11.2: type = converted %int.make_type_signed, %.loc8_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [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: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @WithNontype(%N.loc4_19.1: %i32) { -// CHECK:STDOUT: %N.loc4_19.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc4_19.2 (constants.%N.1)] -// CHECK:STDOUT: %N.patt.loc4_19.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_19.2 (constants.%N.patt.1)] +// CHECK:STDOUT: %N.loc4_19.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc4_19.2 (constants.%N.2)] +// CHECK:STDOUT: %N.patt.loc4_19.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_19.2 (constants.%N.patt.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%WithNontype.1 @@ -868,16 +858,16 @@ fn G() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%N.loc6_6.1: %i32) { -// CHECK:STDOUT: %N.loc6_6.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc6_6.2 (constants.%N.1)] -// CHECK:STDOUT: %N.patt.loc6_6.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_6.2 (constants.%N.patt.1)] +// CHECK:STDOUT: %N.loc6_6.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc6_6.2 (constants.%N.2)] +// CHECK:STDOUT: %N.patt.loc6_6.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_6.2 (constants.%N.patt.2)] // CHECK:STDOUT: %WithNontype.loc6_31.2: type = class_type @WithNontype, @WithNontype(%N.loc6_6.2) [symbolic = %WithNontype.loc6_31.2 (constants.%WithNontype.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type @F.%WithNontype.loc6_31.2 (%WithNontype.1) [symbolic = %require_complete (constants.%require_complete.1)] +// CHECK:STDOUT: %require_complete: = require_complete_type @F.%WithNontype.loc6_31.2 (%WithNontype.1) [symbolic = %require_complete (constants.%require_complete.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%N.param_patt: %i32](%x.param_patt: @F.%WithNontype.loc6_31.2 (%WithNontype.1)) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %N.ref.loc6_50: %i32 = name_ref N, %N.loc6_6.1 [symbolic = %N.loc6_6.2 (constants.%N.1)] +// CHECK:STDOUT: %N.ref.loc6_50: %i32 = name_ref N, %N.loc6_6.1 [symbolic = %N.loc6_6.2 (constants.%N.2)] // CHECK:STDOUT: return %N.ref.loc6_50 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -888,7 +878,7 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc9_13.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %WithNontype.ref: %WithNontype.type = name_ref WithNontype, file.%WithNontype.decl [template = constants.%WithNontype.generic] // 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: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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] @@ -907,21 +897,21 @@ fn G() -> i32 { // CHECK:STDOUT: return %.loc9_33.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @WithNontype(constants.%N.1) { -// CHECK:STDOUT: %N.loc4_19.2 => constants.%N.1 -// CHECK:STDOUT: %N.patt.loc4_19.2 => constants.%N.1 +// CHECK:STDOUT: specific @WithNontype(constants.%N.2) { +// CHECK:STDOUT: %N.loc4_19.2 => constants.%N.2 +// CHECK:STDOUT: %N.patt.loc4_19.2 => constants.%N.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @WithNontype(@F.%N.loc6_6.2) { -// CHECK:STDOUT: %N.loc4_19.2 => constants.%N.1 -// CHECK:STDOUT: %N.patt.loc4_19.2 => constants.%N.1 +// CHECK:STDOUT: %N.loc4_19.2 => constants.%N.2 +// CHECK:STDOUT: %N.patt.loc4_19.2 => constants.%N.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%N.1) { -// CHECK:STDOUT: %N.loc6_6.2 => constants.%N.1 -// CHECK:STDOUT: %N.patt.loc6_6.2 => constants.%N.1 +// CHECK:STDOUT: specific @F(constants.%N.2) { +// CHECK:STDOUT: %N.loc6_6.2 => constants.%N.2 +// CHECK:STDOUT: %N.patt.loc6_6.2 => constants.%N.2 // CHECK:STDOUT: %WithNontype.loc6_31.2 => constants.%WithNontype.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -938,6 +928,6 @@ fn G() -> i32 { // CHECK:STDOUT: %WithNontype.loc6_31.2 => constants.%WithNontype.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%complete_type.1 +// CHECK:STDOUT: %require_complete => constants.%complete_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/deduce/int_float.carbon b/toolchain/check/testdata/deduce/int_float.carbon index 90b616c100b4..e6fefe00175b 100644 --- a/toolchain/check/testdata/deduce/int_float.carbon +++ b/toolchain/check/testdata/deduce/int_float.carbon @@ -43,18 +43,19 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [template] // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic] -// CHECK:STDOUT: %Int.type: type = fn_type @Int [template] -// CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic] +// CHECK:STDOUT: %Int.type: type = generic_class_type @Int [template] +// CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [template] +// CHECK:STDOUT: %Int: type = class_type @Int, @Int(%N) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %require_complete: = require_complete_type %iN [symbolic] +// CHECK:STDOUT: %require_complete.2: = require_complete_type %Int [symbolic] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %i64: type = int_type signed, %int_64 [template] +// CHECK:STDOUT: %i64: type = class_type @Int, @Int(%int_64) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] +// CHECK:STDOUT: %i64.builtin: type = int_type signed, %int_64 [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %i64.builtin [template] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%int_64) [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %i64 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -64,8 +65,8 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %IntLiteral.type = import_ref Core//prelude/types, IntLiteral, loaded [template = constants.%IntLiteral] -// CHECK:STDOUT: %import_ref.2: %Int.type = import_ref Core//prelude/types, Int, loaded [template = constants.%Int] +// CHECK:STDOUT: %import_ref.1: %IntLiteral.type = import_ref Core//prelude/types/int_literal, IntLiteral, loaded [template = constants.%IntLiteral] +// CHECK:STDOUT: %import_ref.2: %Int.type = import_ref Core//prelude/types/int, Int, loaded [template = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -78,8 +79,8 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %N.patt.loc4_6.1: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_6.2 (constants.%N.patt)] // CHECK:STDOUT: %N.param_patt: Core.IntLiteral = value_param_pattern %N.patt.loc4_6.1, runtime_param [symbolic = %N.patt.loc4_6.2 (constants.%N.patt)] -// CHECK:STDOUT: %n.patt: @F.%iN (%iN) = binding_pattern n -// CHECK:STDOUT: %n.param_patt: @F.%iN (%iN) = value_param_pattern %n.patt, runtime_param0 +// CHECK:STDOUT: %n.patt: @F.%Int.loc4_42.2 (%Int) = binding_pattern n +// CHECK:STDOUT: %n.param_patt: @F.%Int.loc4_42.2 (%Int) = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { @@ -89,11 +90,9 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: %.loc4_26.1: type = value_of_initializer %int_literal.make_type.loc4_26 [template = Core.IntLiteral] // CHECK:STDOUT: %.loc4_26.2: type = converted %int_literal.make_type.loc4_26, %.loc4_26.1 [template = Core.IntLiteral] // CHECK:STDOUT: %Core.ref.loc4_32: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] +// CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int.generic] // CHECK:STDOUT: %N.ref.loc4: Core.IntLiteral = name_ref N, %N.loc4_6.1 [symbolic = %N.loc4_6.2 (constants.%N)] -// CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%N.ref.loc4) [symbolic = %iN (constants.%iN)] -// CHECK:STDOUT: %.loc4_42.1: type = value_of_initializer %int.make_type_signed [symbolic = %iN (constants.%iN)] -// CHECK:STDOUT: %.loc4_42.2: type = converted %int.make_type_signed, %.loc4_42.1 [symbolic = %iN (constants.%iN)] +// CHECK:STDOUT: %Int.loc4_42.1: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc4_42.2 (constants.%Int)] // CHECK:STDOUT: %Core.ref.loc4_48: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %IntLiteral.ref.loc4_52: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type.loc4_64: init type = call %IntLiteral.ref.loc4_52() [template = Core.IntLiteral] @@ -101,8 +100,8 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: %.loc4_64.2: type = converted %int_literal.make_type.loc4_64, %.loc4_64.1 [template = Core.IntLiteral] // CHECK:STDOUT: %N.param: Core.IntLiteral = value_param runtime_param // CHECK:STDOUT: %N.loc4_6.1: Core.IntLiteral = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc4_6.2 (constants.%N)] -// CHECK:STDOUT: %n.param: @F.%iN (%iN) = value_param runtime_param0 -// CHECK:STDOUT: %n: @F.%iN (%iN) = bind_name n, %n.param +// CHECK:STDOUT: %n.param: @F.%Int.loc4_42.2 (%Int) = value_param runtime_param0 +// CHECK:STDOUT: %n: @F.%Int.loc4_42.2 (%Int) = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param runtime_param1 // CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param // CHECK:STDOUT: } @@ -113,9 +112,7 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_64) [template = constants.%i64] -// CHECK:STDOUT: %.loc8_9.1: type = value_of_initializer %int.make_type_signed [template = constants.%i64] -// CHECK:STDOUT: %.loc8_9.2: type = converted %int.make_type_signed, %.loc8_9.1 [template = constants.%i64] +// CHECK:STDOUT: %i64: type = class_type @Int, @Int(constants.%int_64) [template = constants.%i64] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] @@ -131,12 +128,12 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: generic fn @F(%N.loc4_6.1: Core.IntLiteral) { // CHECK:STDOUT: %N.loc4_6.2: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N.loc4_6.2 (constants.%N)] // CHECK:STDOUT: %N.patt.loc4_6.2: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_6.2 (constants.%N.patt)] -// CHECK:STDOUT: %iN: type = int_type signed, %N.loc4_6.2 [symbolic = %iN (constants.%iN)] +// CHECK:STDOUT: %Int.loc4_42.2: type = class_type @Int, @Int(%N.loc4_6.2) [symbolic = %Int.loc4_42.2 (constants.%Int)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type @F.%iN (%iN) [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type @F.%Int.loc4_42.2 (%Int) [symbolic = %require_complete (constants.%require_complete.2)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%N.param_patt: Core.IntLiteral](%n.param_patt: @F.%iN (%iN)) -> Core.IntLiteral { +// CHECK:STDOUT: fn[%N.param_patt: Core.IntLiteral](%n.param_patt: @F.%Int.loc4_42.2 (%Int)) -> Core.IntLiteral { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %N.ref.loc5: Core.IntLiteral = name_ref N, %N.loc4_6.1 [symbolic = %N.loc4_6.2 (constants.%N)] // CHECK:STDOUT: return %N.ref.loc5 @@ -157,16 +154,16 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: specific @F(constants.%N) { // CHECK:STDOUT: %N.loc4_6.2 => constants.%N // CHECK:STDOUT: %N.patt.loc4_6.2 => constants.%N -// CHECK:STDOUT: %iN => constants.%iN +// CHECK:STDOUT: %Int.loc4_42.2 => constants.%Int // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%int_64) { // CHECK:STDOUT: %N.loc4_6.2 => constants.%int_64 // CHECK:STDOUT: %N.patt.loc4_6.2 => constants.%int_64 -// CHECK:STDOUT: %iN => constants.%i64 +// CHECK:STDOUT: %Int.loc4_42.2 => constants.%i64 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%complete_type +// CHECK:STDOUT: %require_complete => constants.%complete_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_float.carbon @@ -192,7 +189,7 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %IntLiteral.type = import_ref Core//prelude/types, IntLiteral, loaded [template = constants.%IntLiteral] +// CHECK:STDOUT: %import_ref.1: %IntLiteral.type = import_ref Core//prelude/types/int_literal, IntLiteral, loaded [template = constants.%IntLiteral] // CHECK:STDOUT: %import_ref.2: %Float.type = import_ref Core//prelude/types, Float, loaded [template = constants.%Float] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/deduce/tuple.carbon b/toolchain/check/testdata/deduce/tuple.carbon index 1b6a7ba588e1..223a9ccd4dcf 100644 --- a/toolchain/check/testdata/deduce/tuple.carbon +++ b/toolchain/check/testdata/deduce/tuple.carbon @@ -225,9 +225,7 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [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: %Pair: %tuple.type.2 = bind_symbolic_name Pair, 0 [symbolic] @@ -236,7 +234,7 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %HasPair.generic: %HasPair.type = struct_value () [template] // CHECK:STDOUT: %HasPair.1: type = class_type @HasPair, @HasPair(%Pair) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %A: %i32 = bind_symbolic_name A, 0 [symbolic] // CHECK:STDOUT: %A.patt: %i32 = symbolic_binding_pattern A, 0 [symbolic] // CHECK:STDOUT: %B: %i32 = bind_symbolic_name B, 1 [symbolic] @@ -245,18 +243,18 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %HasPair.2: type = class_type @HasPair, @HasPair(%tuple.1) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %require_complete.1: = require_complete_type %HasPair.2 [symbolic] +// CHECK:STDOUT: %require_complete.2: = require_complete_type %HasPair.2 [symbolic] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %tuple.2: %tuple.type.2 = tuple_value (%int_1.2, %int_2.2) [template] @@ -269,7 +267,7 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -288,15 +286,11 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %Pair.param_patt: %tuple.type.2 = value_param_pattern %Pair.patt.loc4_15.1, runtime_param [symbolic = %Pair.patt.loc4_15.2 (constants.%Pair.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc4_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_23: init type = call constants.%Int(%int_32.loc4_23) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_28: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_28: init type = call constants.%Int(%int_32.loc4_28) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_31.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc4_23, %int.make_type_signed.loc4_28) -// CHECK:STDOUT: %.loc4_31.2: type = value_of_initializer %int.make_type_signed.loc4_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_31.3: type = converted %int.make_type_signed.loc4_23, %.loc4_31.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_31.4: type = value_of_initializer %int.make_type_signed.loc4_28 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_31.5: type = converted %int.make_type_signed.loc4_28, %.loc4_31.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_31.6: type = converted %.loc4_31.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc4_28: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_31.1: %tuple.type.1 = tuple_literal (%i32.loc4_23, %i32.loc4_28) +// CHECK:STDOUT: %.loc4_31.2: type = converted %.loc4_31.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %Pair.param: %tuple.type.2 = value_param runtime_param // CHECK:STDOUT: %Pair.loc4_15.1: %tuple.type.2 = bind_symbolic_name Pair, 0, %Pair.param [symbolic = %Pair.loc4_15.2 (constants.%Pair)] // CHECK:STDOUT: } @@ -311,13 +305,9 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc6_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_10: init type = call constants.%Int(%int_32.loc6_10) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.1: type = value_of_initializer %int.make_type_signed.loc6_10 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_10.2: type = converted %int.make_type_signed.loc6_10, %.loc6_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc6_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_19: init type = call constants.%Int(%int_32.loc6_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_19.1: type = value_of_initializer %int.make_type_signed.loc6_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_19.2: type = converted %int.make_type_signed.loc6_19, %.loc6_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %HasPair.ref: %HasPair.type = name_ref HasPair, file.%HasPair.decl [template = constants.%HasPair.generic] // CHECK:STDOUT: %A.ref: %i32 = name_ref A, %A.loc6_6.1 [symbolic = %A.loc6_6.2 (constants.%A)] // CHECK:STDOUT: %B.ref.loc6_39: %i32 = name_ref B, %B.loc6_15.1 [symbolic = %B.loc6_15.2 (constants.%B)] @@ -326,9 +316,7 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %.loc6_41: %tuple.type.2 = converted %.loc6_40, %tuple.loc6_40.1 [symbolic = %tuple.loc6_40.2 (constants.%tuple.1)] // CHECK:STDOUT: %HasPair.loc6_41.1: type = class_type @HasPair, @HasPair(constants.%tuple.1) [symbolic = %HasPair.loc6_41.2 (constants.%HasPair.2)] // CHECK:STDOUT: %int_32.loc6_47: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_47: init type = call constants.%Int(%int_32.loc6_47) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_47.1: type = value_of_initializer %int.make_type_signed.loc6_47 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_47.2: type = converted %int.make_type_signed.loc6_47, %.loc6_47.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6_47: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %A.param: %i32 = value_param runtime_param // CHECK:STDOUT: %A.loc6_6.1: %i32 = bind_symbolic_name A, 0, %A.param [symbolic = %A.loc6_6.2 (constants.%A)] // CHECK:STDOUT: %B.param: %i32 = value_param runtime_param @@ -348,13 +336,13 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc8_22.1: %tuple.type.3 = tuple_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc8_22.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc8_22.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc8_22.1: = bound_method %int_1, %impl.elem0.loc8_22.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc8_22.1: = specific_function %Convert.bound.loc8_22.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc8_22.1: init %i32 = call %Convert.specific_fn.loc8_22.1(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc8_22.2: %i32 = value_of_initializer %int.convert_checked.loc8_22.1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc8_22.3: %i32 = converted %int_1, %.loc8_22.2 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc8_22.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc8_22.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc8_22.2: = bound_method %int_2, %impl.elem0.loc8_22.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc8_22.2: = specific_function %Convert.bound.loc8_22.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc8_22.2: init %i32 = call %Convert.specific_fn.loc8_22.2(%int_2) [template = constants.%int_2.2] @@ -364,9 +352,7 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %.loc8_23: %tuple.type.2 = converted %.loc8_22.1, %tuple [template = constants.%tuple.2] // CHECK:STDOUT: %HasPair: type = class_type @HasPair, @HasPair(constants.%tuple.2) [template = constants.%HasPair.3] // 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: %.loc8_29.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_29.2: type = converted %int.make_type_signed, %.loc8_29.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %h.param: %HasPair.3 = value_param runtime_param0 // CHECK:STDOUT: %h: %HasPair.3 = bind_name h, %h.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -381,7 +367,7 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%HasPair.1 @@ -398,7 +384,7 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %HasPair.loc6_41.2: type = class_type @HasPair, @HasPair(%tuple.loc6_40.2) [symbolic = %HasPair.loc6_41.2 (constants.%HasPair.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type @F.%HasPair.loc6_41.2 (%HasPair.2) [symbolic = %require_complete (constants.%require_complete.1)] +// CHECK:STDOUT: %require_complete: = require_complete_type @F.%HasPair.loc6_41.2 (%HasPair.2) [symbolic = %require_complete (constants.%require_complete.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%A.param_patt: %i32, %B.param_patt: %i32](%h.param_patt: @F.%HasPair.loc6_41.2 (%HasPair.2)) -> %i32 { // CHECK:STDOUT: !entry: @@ -460,7 +446,7 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %HasPair.loc6_41.2 => constants.%HasPair.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%complete_type.1 +// CHECK:STDOUT: %require_complete => constants.%complete_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_inconsistent.carbon diff --git a/toolchain/check/testdata/eval/aggregate.carbon b/toolchain/check/testdata/eval/aggregate.carbon index a2839c49ff9e..c9aa14b37a8f 100644 --- a/toolchain/check/testdata/eval/aggregate.carbon +++ b/toolchain/check/testdata/eval/aggregate.carbon @@ -20,22 +20,20 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [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: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %tuple.1: %tuple.type.2 = tuple_value (%int_1.2, %int_2.2) [template] @@ -43,7 +41,7 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %struct_type.c.b.a: type = struct_type {.c: Core.IntLiteral, .b: Core.IntLiteral, .a: Core.IntLiteral} [template] // CHECK:STDOUT: %struct_type.b.a.c: type = struct_type {.b: %i32, .a: %i32, .c: %i32} [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %struct.1: %struct_type.b.a.c = struct_value (%int_2.2, %int_1.2, %int_3.2) [template] @@ -56,7 +54,7 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [template] // CHECK:STDOUT: %tuple.type.5: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %tuple.2: %tuple.type.5 = tuple_value (%int_5, %int_7, %int_1.1, %int_9) [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_0.2) [template] @@ -67,7 +65,7 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -83,45 +81,31 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int_32.loc11_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_18: init type = call constants.%Int(%int_32.loc11_18) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_23: init type = call constants.%Int(%int_32.loc11_23) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_26.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_18, %int.make_type_signed.loc11_23) -// CHECK:STDOUT: %.loc11_26.2: type = value_of_initializer %int.make_type_signed.loc11_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_26.3: type = converted %int.make_type_signed.loc11_18, %.loc11_26.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_26.4: type = value_of_initializer %int.make_type_signed.loc11_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_26.5: type = converted %int.make_type_signed.loc11_23, %.loc11_26.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_26.6: type = converted %.loc11_26.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc11_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_26.1: %tuple.type.1 = tuple_literal (%i32.loc11_18, %i32.loc11_23) +// CHECK:STDOUT: %.loc11_26.2: type = converted %.loc11_26.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %tuple_copy.var: ref %tuple.type.2 = var tuple_copy // CHECK:STDOUT: %tuple_copy: ref %tuple.type.2 = bind_name tuple_copy, %tuple_copy.var // CHECK:STDOUT: %int_32.loc13_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_23: init type = call constants.%Int(%int_32.loc13_23) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %int.make_type_signed.loc13_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.2: type = converted %int.make_type_signed.loc13_23, %.loc13_23.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_32: init type = call constants.%Int(%int_32.loc13_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_32.1: type = value_of_initializer %int.make_type_signed.loc13_32 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_32.2: type = converted %int.make_type_signed.loc13_32, %.loc13_32.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_41: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_41: init type = call constants.%Int(%int_32.loc13_41) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_41.1: type = value_of_initializer %int.make_type_signed.loc13_41 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_41.2: type = converted %int.make_type_signed.loc13_41, %.loc13_41.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_41: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a.b.c: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [template = constants.%struct_type.a.b.c] // CHECK:STDOUT: %struct_copy.var: ref %struct_type.a.b.c = var struct_copy // CHECK:STDOUT: %struct_copy: ref %struct_type.a.b.c = bind_name struct_copy, %struct_copy.var // 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: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %.loc15_19.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_19.2: type = converted %int.make_type_signed.loc15, %.loc15_19.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc15: type = array_type %int_1.loc15, %i32 [template = constants.%array_type] // CHECK:STDOUT: %tuple_index.var: ref %array_type = var tuple_index // CHECK:STDOUT: %tuple_index: ref %array_type = bind_name tuple_index, %tuple_index.var // CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%int_32.loc17) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_1.loc17: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %.loc17_21.1: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_21.2: type = converted %int.make_type_signed.loc17, %.loc17_21.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc17: type = array_type %int_1.loc17, %i32 [template = constants.%array_type] // CHECK:STDOUT: %struct_access.var: ref %array_type = var struct_access // CHECK:STDOUT: %struct_access: ref %array_type = bind_name struct_access, %struct_access.var @@ -133,22 +117,18 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %int_2.loc11: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc11_35.1: %tuple.type.3 = tuple_literal (%int_1.loc11, %int_2.loc11) // CHECK:STDOUT: %int_32.loc11_41: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_41: init type = call constants.%Int(%int_32.loc11_41) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_41: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_46: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_46: init type = call constants.%Int(%int_32.loc11_46) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_49.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_41, %int.make_type_signed.loc11_46) -// CHECK:STDOUT: %.loc11_49.2: type = value_of_initializer %int.make_type_signed.loc11_41 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_49.3: type = converted %int.make_type_signed.loc11_41, %.loc11_49.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_49.4: type = value_of_initializer %int.make_type_signed.loc11_46 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_49.5: type = converted %int.make_type_signed.loc11_46, %.loc11_49.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_49.6: type = converted %.loc11_49.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %impl.elem0.loc11_35.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %i32.loc11_46: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_49.1: %tuple.type.1 = tuple_literal (%i32.loc11_41, %i32.loc11_46) +// CHECK:STDOUT: %.loc11_49.2: type = converted %.loc11_49.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %impl.elem0.loc11_35.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_35.1: = bound_method %int_1.loc11, %impl.elem0.loc11_35.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_35.1: = specific_function %Convert.bound.loc11_35.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_35.1: init %i32 = call %Convert.specific_fn.loc11_35.1(%int_1.loc11) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc11_35.2: %i32 = value_of_initializer %int.convert_checked.loc11_35.1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc11_35.3: %i32 = converted %int_1.loc11, %.loc11_35.2 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc11_35.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_35.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_35.2: = bound_method %int_2.loc11, %impl.elem0.loc11_35.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_35.2: = specific_function %Convert.bound.loc11_35.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_35.2: init %i32 = call %Convert.specific_fn.loc11_35.2(%int_2.loc11) [template = constants.%int_2.2] @@ -170,31 +150,25 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc13_71.1: %struct_type.c.b.a = struct_literal (%int_3.loc13, %int_2.loc13, %int_1.loc13) // CHECK:STDOUT: %int_32.loc13_81: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_81: init type = call constants.%Int(%int_32.loc13_81) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_81.1: type = value_of_initializer %int.make_type_signed.loc13_81 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_81.2: type = converted %int.make_type_signed.loc13_81, %.loc13_81.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_81: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_90: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_90: init type = call constants.%Int(%int_32.loc13_90) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_90.1: type = value_of_initializer %int.make_type_signed.loc13_90 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_90.2: type = converted %int.make_type_signed.loc13_90, %.loc13_90.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_90: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_99: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_99: init type = call constants.%Int(%int_32.loc13_99) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_99.1: type = value_of_initializer %int.make_type_signed.loc13_99 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_99.2: type = converted %int.make_type_signed.loc13_99, %.loc13_99.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_99: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.b.a.c: type = struct_type {.b: %i32, .a: %i32, .c: %i32} [template = constants.%struct_type.b.a.c] -// CHECK:STDOUT: %impl.elem0.loc13_71.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13_71.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13_71.1: = bound_method %int_2.loc13, %impl.elem0.loc13_71.1 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc13_71.1: = specific_function %Convert.bound.loc13_71.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc13_71.1: init %i32 = call %Convert.specific_fn.loc13_71.1(%int_2.loc13) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc13_71.2: %i32 = value_of_initializer %int.convert_checked.loc13_71.1 [template = constants.%int_2.2] // CHECK:STDOUT: %.loc13_71.3: %i32 = converted %int_2.loc13, %.loc13_71.2 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc13_71.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13_71.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13_71.2: = bound_method %int_1.loc13, %impl.elem0.loc13_71.2 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc13_71.2: = specific_function %Convert.bound.loc13_71.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc13_71.2: init %i32 = call %Convert.specific_fn.loc13_71.2(%int_1.loc13) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc13_71.4: %i32 = value_of_initializer %int.convert_checked.loc13_71.2 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc13_71.5: %i32 = converted %int_1.loc13, %.loc13_71.4 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc13_71.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13_71.3: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13_71.3: = bound_method %int_3.loc13, %impl.elem0.loc13_71.3 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc13_71.3: = specific_function %Convert.bound.loc13_71.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc13_71.3: init %i32 = call %Convert.specific_fn.loc13_71.3(%int_3.loc13) [template = constants.%int_3.2] @@ -217,7 +191,7 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %int_0.loc15_30: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc15_32.1: %tuple.type.4 = tuple_literal (%int_0.loc15_30) // 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: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5] // CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [template = constants.%int_7] // CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] @@ -227,10 +201,8 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %tuple.loc15: %tuple.type.5 = tuple_value (%int_5, %int_7, %int_1.loc15, %int_9) [template = constants.%tuple.2] // CHECK:STDOUT: %.loc15_54.2: %tuple.type.5 = converted %.loc15_54.1, %tuple.loc15 [template = constants.%tuple.2] // CHECK:STDOUT: %tuple.elem2: Core.IntLiteral = tuple_access %.loc15_54.2, element2 [template = constants.%int_1.1] -// CHECK:STDOUT: %.loc15_38.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_38.2: type = converted %int.make_type_signed.loc15, %.loc15_38.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc15: type = array_type %tuple.elem2, %i32 [template = constants.%array_type] -// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc15: = bound_method %int_0.loc15_30, %impl.elem0.loc15 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc15: = specific_function %Convert.bound.loc15, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %Convert.specific_fn.loc15(%int_0.loc15_30) [template = constants.%int_0.2] @@ -245,17 +217,15 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %int_0.loc17_32: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc17_34.1: %tuple.type.4 = tuple_literal (%int_0.loc17_32) // CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%int_32.loc17) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_3.loc17: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %int_1.loc17: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc17_60.1: %struct_type.a.b = struct_literal (%int_3.loc17, %int_1.loc17) // CHECK:STDOUT: %struct.loc17: %struct_type.a.b = struct_value (%int_3.loc17, %int_1.loc17) [template = constants.%struct.3] // CHECK:STDOUT: %.loc17_60.2: %struct_type.a.b = converted %.loc17_60.1, %struct.loc17 [template = constants.%struct.3] // CHECK:STDOUT: %.loc17_61: Core.IntLiteral = struct_access %.loc17_60.2, element1 [template = constants.%int_1.1] -// CHECK:STDOUT: %.loc17_40.1: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_40.2: type = converted %int.make_type_signed.loc17, %.loc17_40.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc17: type = array_type %.loc17_61, %i32 [template = constants.%array_type] -// CHECK:STDOUT: %impl.elem0.loc17: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc17: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc17: = bound_method %int_0.loc17_32, %impl.elem0.loc17 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc17: = specific_function %Convert.bound.loc17, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %Convert.specific_fn.loc17(%int_0.loc17_32) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/eval/fail_aggregate.carbon b/toolchain/check/testdata/eval/fail_aggregate.carbon index 572220207c2b..5c171d007fba 100644 --- a/toolchain/check/testdata/eval/fail_aggregate.carbon +++ b/toolchain/check/testdata/eval/fail_aggregate.carbon @@ -19,9 +19,7 @@ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %array_type.1: type = array_type %int_1.1, %i32 [template] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] @@ -33,25 +31,25 @@ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template] // CHECK:STDOUT: %array_type.2: type = array_type %int_4, %i32 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_5.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_7.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_7.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_7.2: %i32 = int_value 7 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_9.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_9.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_9.2: %i32 = int_value 9 [template] // CHECK:STDOUT: %array: %array_type.2 = tuple_value (%int_5.2, %int_7.2, %int_1.2, %int_9.2) [template] -// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.5: = specific_function %Convert.bound.5, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } @@ -59,7 +57,7 @@ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -72,10 +70,8 @@ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_19.2: type = converted %int.make_type_signed, %.loc16_19.1 [template = constants.%i32] // CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template = constants.%array_type.1] // CHECK:STDOUT: %array_index.var: ref %array_type.1 = var array_index // CHECK:STDOUT: %array_index: ref %array_type.1 = bind_name array_index, %array_index.var @@ -86,19 +82,17 @@ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDOUT: %int_0.loc16_30: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %.loc16_32: %tuple.type.1 = tuple_literal (%int_0.loc16_30) // CHECK:STDOUT: %int_32.loc16_38: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc16_38: init type = call constants.%Int(%int_32.loc16_38) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc16_38: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] // CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [template = constants.%int_7.1] // CHECK:STDOUT: %int_1.loc16_51: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [template = constants.%int_9.1] // CHECK:STDOUT: %.loc16_55.1: %tuple.type.2 = tuple_literal (%int_5, %int_7, %int_1.loc16_51, %int_9) // CHECK:STDOUT: %int_32.loc16_61: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc16_61: init type = call constants.%Int(%int_32.loc16_61) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc16_61: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4] -// CHECK:STDOUT: %.loc16_61.1: type = value_of_initializer %int.make_type_signed.loc16_61 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_61.2: type = converted %int.make_type_signed.loc16_61, %.loc16_61.1 [template = constants.%i32] // CHECK:STDOUT: %array_type: type = array_type %int_4, %i32 [template = constants.%array_type.2] -// CHECK:STDOUT: %impl.elem0.loc16_55.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc16_55.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc16_55.1: = bound_method %int_5, %impl.elem0.loc16_55.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc16_55.1: = specific_function %Convert.bound.loc16_55.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc16_55.1: init %i32 = call %Convert.specific_fn.loc16_55.1(%int_5) [template = constants.%int_5.2] @@ -107,7 +101,7 @@ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDOUT: %int_0.loc16_55: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %.loc16_55.4: ref %i32 = array_index %.loc16_55.3, %int_0.loc16_55 // CHECK:STDOUT: %.loc16_55.5: init %i32 = initialize_from %.loc16_55.2 to %.loc16_55.4 [template = constants.%int_5.2] -// CHECK:STDOUT: %impl.elem0.loc16_55.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc16_55.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc16_55.2: = bound_method %int_7, %impl.elem0.loc16_55.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc16_55.2: = specific_function %Convert.bound.loc16_55.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc16_55.2: init %i32 = call %Convert.specific_fn.loc16_55.2(%int_7) [template = constants.%int_7.2] @@ -115,7 +109,7 @@ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDOUT: %int_1.loc16_55: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc16_55.7: ref %i32 = array_index %.loc16_55.3, %int_1.loc16_55 // CHECK:STDOUT: %.loc16_55.8: init %i32 = initialize_from %.loc16_55.6 to %.loc16_55.7 [template = constants.%int_7.2] -// CHECK:STDOUT: %impl.elem0.loc16_55.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc16_55.3: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc16_55.3: = bound_method %int_1.loc16_51, %impl.elem0.loc16_55.3 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc16_55.3: = specific_function %Convert.bound.loc16_55.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc16_55.3: init %i32 = call %Convert.specific_fn.loc16_55.3(%int_1.loc16_51) [template = constants.%int_1.2] @@ -123,7 +117,7 @@ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDOUT: %int_2.loc16_55: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc16_55.10: ref %i32 = array_index %.loc16_55.3, %int_2.loc16_55 // CHECK:STDOUT: %.loc16_55.11: init %i32 = initialize_from %.loc16_55.9 to %.loc16_55.10 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc16_55.4: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc16_55.4: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc16_55.4: = bound_method %int_9, %impl.elem0.loc16_55.4 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc16_55.4: = specific_function %Convert.bound.loc16_55.4, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc16_55.4: init %i32 = call %Convert.specific_fn.loc16_55.4(%int_9) [template = constants.%int_9.2] @@ -136,19 +130,15 @@ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDOUT: %int_2.loc16_70: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc16_57.2: ref %array_type.2 = temporary %.loc16_55.3, %.loc16_57.1 // CHECK:STDOUT: %int_32.loc16_71: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc16_71: init type = call constants.%Int(%int_32.loc16_71) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_71.1: type = value_of_initializer %int.make_type_signed.loc16_71 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_71.2: type = converted %int.make_type_signed.loc16_71, %.loc16_71.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc16_70: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %i32.loc16_71: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc16_70: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc16_70: = bound_method %int_2.loc16_70, %impl.elem0.loc16_70 [template = constants.%Convert.bound.5] // CHECK:STDOUT: %Convert.specific_fn.loc16_70: = specific_function %Convert.bound.loc16_70, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.5] // CHECK:STDOUT: %int.convert_checked.loc16_70: init %i32 = call %Convert.specific_fn.loc16_70(%int_2.loc16_70) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc16_70.1: %i32 = value_of_initializer %int.convert_checked.loc16_70 [template = constants.%int_2.2] // CHECK:STDOUT: %.loc16_70.2: %i32 = converted %int_2.loc16_70, %.loc16_70.1 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc16_71.3: ref %i32 = array_index %.loc16_57.2, %.loc16_70.2 -// CHECK:STDOUT: %.loc16_71.4: %i32 = bind_value %.loc16_71.3 -// CHECK:STDOUT: %.loc16_38.1: type = value_of_initializer %int.make_type_signed.loc16_38 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_38.2: type = converted %int.make_type_signed.loc16_38, %.loc16_38.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc16_71.1: ref %i32 = array_index %.loc16_57.2, %.loc16_70.2 +// CHECK:STDOUT: %.loc16_71.2: %i32 = bind_value %.loc16_71.1 // CHECK:STDOUT: assign file.%array_index.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/eval/fail_symbolic.carbon b/toolchain/check/testdata/eval/fail_symbolic.carbon index 0a287e61aff7..00f64b707eef 100644 --- a/toolchain/check/testdata/eval/fail_symbolic.carbon +++ b/toolchain/check/testdata/eval/fail_symbolic.carbon @@ -20,26 +20,24 @@ fn G(N:! i32) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %N.1: %i32 = bind_symbolic_name N, 0 [symbolic] -// CHECK:STDOUT: %N.patt.1: %i32 = symbolic_binding_pattern N, 0 [symbolic] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %N.2: %i32 = bind_symbolic_name N, 0 [symbolic] +// CHECK:STDOUT: %N.patt.2: %i32 = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.13) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %N.1, %Convert.13 [symbolic] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.4(%int_32) [symbolic] -// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %Convert.specific_fn(%N.1) [symbolic] +// CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.9) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %N.2, %Convert.9 [symbolic] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.3(%int_32) [symbolic] +// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %Convert.specific_fn(%N.2) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -52,37 +50,33 @@ fn G(N:! i32) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %N.patt.loc12_6.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc12_6.2 (constants.%N.patt.1)] -// CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc12_6.1, runtime_param [symbolic = %N.patt.loc12_6.2 (constants.%N.patt.1)] +// CHECK:STDOUT: %N.patt.loc12_6.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc12_6.2 (constants.%N.patt.2)] +// CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc12_6.1, runtime_param [symbolic = %N.patt.loc12_6.2 (constants.%N.patt.2)] // CHECK:STDOUT: } { // 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: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param -// CHECK:STDOUT: %N.loc12_6.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc12_6.2 (constants.%N.1)] +// CHECK:STDOUT: %N.loc12_6.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc12_6.2 (constants.%N.2)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @G(%N.loc12_6.1: %i32) { -// CHECK:STDOUT: %N.loc12_6.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc12_6.2 (constants.%N.1)] -// CHECK:STDOUT: %N.patt.loc12_6.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc12_6.2 (constants.%N.patt.1)] +// CHECK:STDOUT: %N.loc12_6.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc12_6.2 (constants.%N.2)] +// CHECK:STDOUT: %N.patt.loc12_6.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc12_6.2 (constants.%N.patt.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Convert.bound.loc16_16.2: = bound_method %N.loc12_6.2, constants.%Convert.13 [symbolic = %Convert.bound.loc16_16.2 (constants.%Convert.bound)] -// CHECK:STDOUT: %Convert.specific_fn.loc16_16.2: = specific_function %Convert.bound.loc16_16.2, @Convert.4(constants.%int_32) [symbolic = %Convert.specific_fn.loc16_16.2 (constants.%Convert.specific_fn)] +// CHECK:STDOUT: %Convert.bound.loc16_16.2: = bound_method %N.loc12_6.2, constants.%Convert.9 [symbolic = %Convert.bound.loc16_16.2 (constants.%Convert.bound)] +// CHECK:STDOUT: %Convert.specific_fn.loc16_16.2: = specific_function %Convert.bound.loc16_16.2, @Convert.3(constants.%int_32) [symbolic = %Convert.specific_fn.loc16_16.2 (constants.%Convert.specific_fn)] // CHECK:STDOUT: %int.convert_checked.loc16_16.2: init Core.IntLiteral = call %Convert.specific_fn.loc16_16.2(%N.loc12_6.2) [symbolic = %int.convert_checked.loc16_16.2 (constants.%int.convert_checked)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%N.param_patt: %i32) { // CHECK:STDOUT: !entry: // 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: %N.ref: %i32 = name_ref N, %N.loc12_6.1 [symbolic = %N.loc12_6.2 (constants.%N.1)] -// CHECK:STDOUT: %.loc16_11.1: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_11.2: type = converted %int.make_type_signed.loc16, %.loc16_11.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.13] +// CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc12_6.1 [symbolic = %N.loc12_6.2 (constants.%N.2)] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.9] // CHECK:STDOUT: %Convert.bound.loc16_16.1: = bound_method %N.ref, %impl.elem0 [symbolic = %Convert.bound.loc16_16.2 (constants.%Convert.bound)] -// CHECK:STDOUT: %Convert.specific_fn.loc16_16.1: = specific_function %Convert.bound.loc16_16.1, @Convert.4(constants.%int_32) [symbolic = %Convert.specific_fn.loc16_16.2 (constants.%Convert.specific_fn)] +// CHECK:STDOUT: %Convert.specific_fn.loc16_16.1: = specific_function %Convert.bound.loc16_16.1, @Convert.3(constants.%int_32) [symbolic = %Convert.specific_fn.loc16_16.2 (constants.%Convert.specific_fn)] // CHECK:STDOUT: %int.convert_checked.loc16_16.1: init Core.IntLiteral = call %Convert.specific_fn.loc16_16.1(%N.ref) [symbolic = %int.convert_checked.loc16_16.2 (constants.%int.convert_checked)] // CHECK:STDOUT: %.loc16_16.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc16_16.1 [symbolic = %int.convert_checked.loc16_16.2 (constants.%int.convert_checked)] // CHECK:STDOUT: %.loc16_16.2: Core.IntLiteral = converted %N.ref, %.loc16_16.1 [symbolic = %int.convert_checked.loc16_16.2 (constants.%int.convert_checked)] @@ -93,8 +87,8 @@ fn G(N:! i32) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @G(constants.%N.1) { -// CHECK:STDOUT: %N.loc12_6.2 => constants.%N.1 -// CHECK:STDOUT: %N.patt.loc12_6.2 => constants.%N.1 +// CHECK:STDOUT: specific @G(constants.%N.2) { +// CHECK:STDOUT: %N.loc12_6.2 => constants.%N.2 +// CHECK:STDOUT: %N.patt.loc12_6.2 => constants.%N.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/expr_category/in_place_tuple_init.carbon b/toolchain/check/testdata/expr_category/in_place_tuple_init.carbon index e37098aad791..5a2f2d6b7323 100644 --- a/toolchain/check/testdata/expr_category/in_place_tuple_init.carbon +++ b/toolchain/check/testdata/expr_category/in_place_tuple_init.carbon @@ -24,9 +24,7 @@ fn H() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [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: %F.type: type = fn_type @F [template] @@ -40,7 +38,7 @@ fn H() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -59,15 +57,11 @@ fn H() -> i32 { // CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_12: init type = call constants.%Int(%int_32.loc11_12) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_17: init type = call constants.%Int(%int_32.loc11_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_20.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_12, %int.make_type_signed.loc11_17) -// CHECK:STDOUT: %.loc11_20.2: type = value_of_initializer %int.make_type_signed.loc11_12 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_20.3: type = converted %int.make_type_signed.loc11_12, %.loc11_20.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_20.4: type = value_of_initializer %int.make_type_signed.loc11_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_20.5: type = converted %int.make_type_signed.loc11_17, %.loc11_20.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_20.6: type = converted %.loc11_20.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc11_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_20.1: %tuple.type.1 = tuple_literal (%i32.loc11_12, %i32.loc11_17) +// CHECK:STDOUT: %.loc11_20.2: type = converted %.loc11_20.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %return.param: ref %tuple.type.2 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %tuple.type.2 = return_slot %return.param // CHECK:STDOUT: } @@ -76,15 +70,11 @@ fn H() -> i32 { // CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc13_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_12: init type = call constants.%Int(%int_32.loc13_12) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_17: init type = call constants.%Int(%int_32.loc13_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_20.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc13_12, %int.make_type_signed.loc13_17) -// CHECK:STDOUT: %.loc13_20.2: type = value_of_initializer %int.make_type_signed.loc13_12 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_20.3: type = converted %int.make_type_signed.loc13_12, %.loc13_20.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_20.4: type = value_of_initializer %int.make_type_signed.loc13_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_20.5: type = converted %int.make_type_signed.loc13_17, %.loc13_20.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_20.6: type = converted %.loc13_20.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc13_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_20.1: %tuple.type.1 = tuple_literal (%i32.loc13_12, %i32.loc13_17) +// CHECK:STDOUT: %.loc13_20.2: type = converted %.loc13_20.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %return.param: ref %tuple.type.2 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %tuple.type.2 = return_slot %return.param // CHECK:STDOUT: } @@ -93,9 +83,7 @@ fn H() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc19_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc19_11.2: type = converted %int.make_type_signed, %.loc19_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -106,15 +94,11 @@ fn H() -> i32 { // CHECK:STDOUT: fn @G() -> %return.param_patt: %tuple.type.2 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_32.loc14_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_11: init type = call constants.%Int(%int_32.loc14_11) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc14_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_16: init type = call constants.%Int(%int_32.loc14_16) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_19.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc14_11, %int.make_type_signed.loc14_16) -// CHECK:STDOUT: %.loc14_19.2: type = value_of_initializer %int.make_type_signed.loc14_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_19.3: type = converted %int.make_type_signed.loc14_11, %.loc14_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_19.4: type = value_of_initializer %int.make_type_signed.loc14_16 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_19.5: type = converted %int.make_type_signed.loc14_16, %.loc14_19.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_19.6: type = converted %.loc14_19.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc14_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_19.1: %tuple.type.1 = tuple_literal (%i32.loc14_11, %i32.loc14_16) +// CHECK:STDOUT: %.loc14_19.2: type = converted %.loc14_19.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %v.var: ref %tuple.type.2 = var v // CHECK:STDOUT: %v: ref %tuple.type.2 = bind_name v, %v.var // CHECK:STDOUT: %F.ref.loc14: %F.type = name_ref F, file.%F.decl [template = constants.%F] diff --git a/toolchain/check/testdata/function/builtin/call.carbon b/toolchain/check/testdata/function/builtin/call.carbon index e84eddbb68ea..85b951881c5d 100644 --- a/toolchain/check/testdata/function/builtin/call.carbon +++ b/toolchain/check/testdata/function/builtin/call.carbon @@ -16,30 +16,28 @@ var arr: [i32; Add(1, 2)]; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %Add.type: type = fn_type @Add [template] -// CHECK:STDOUT: %Add: %Add.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %Add.type.1: type = fn_type @Add.1 [template] +// CHECK:STDOUT: %Add: %Add.type.1 = struct_value () [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: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %int_3.1: %i32 = int_value 3 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.15 [template] -// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.11 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.3(%int_32) [template] // CHECK:STDOUT: %int_3.2: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %array_type: type = array_type %int_3.2, %i32 [template] // CHECK:STDOUT: } @@ -47,7 +45,7 @@ var arr: [i32; Add(1, 2)]; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -60,7 +58,7 @@ var arr: [i32; Add(1, 2)]; // CHECK:STDOUT: .arr = %arr // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %Add.decl: %Add.type = fn_decl @Add [template = constants.%Add] { +// CHECK:STDOUT: %Add.decl: %Add.type.1 = fn_decl @Add.1 [template = constants.%Add] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b @@ -69,17 +67,11 @@ var arr: [i32; Add(1, 2)]; // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // 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_11.1: type = value_of_initializer %int.make_type_signed.loc11_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed.loc11_11, %.loc11_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_19: init type = call constants.%Int(%int_32.loc11_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_signed.loc11_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_signed.loc11_19, %.loc11_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_27: init type = call constants.%Int(%int_32.loc11_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_27.1: type = value_of_initializer %int.make_type_signed.loc11_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_27.2: type = converted %int.make_type_signed.loc11_27, %.loc11_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -88,28 +80,26 @@ var arr: [i32; Add(1, 2)]; // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // 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: %Add.ref: %Add.type = name_ref Add, %Add.decl [template = constants.%Add] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %Add.ref: %Add.type.1 = name_ref Add, %Add.decl [template = constants.%Add] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc13_20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13_20: = bound_method %int_1, %impl.elem0.loc13_20 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc13_20: = specific_function %Convert.bound.loc13_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc13_20: init %i32 = call %Convert.specific_fn.loc13_20(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc13_20.1: %i32 = value_of_initializer %int.convert_checked.loc13_20 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc13_20.2: %i32 = converted %int_1, %.loc13_20.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc13_23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13_23: = bound_method %int_2, %impl.elem0.loc13_23 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc13_23: = specific_function %Convert.bound.loc13_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc13_23: init %i32 = call %Convert.specific_fn.loc13_23(%int_2) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc13_23.1: %i32 = value_of_initializer %int.convert_checked.loc13_23 [template = constants.%int_2.2] // CHECK:STDOUT: %.loc13_23.2: %i32 = converted %int_2, %.loc13_23.1 [template = constants.%int_2.2] // CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%.loc13_20.2, %.loc13_23.2) [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc13_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_11.2: type = converted %int.make_type_signed, %.loc13_11.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc13_24: %Convert.type.6 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %impl.elem0.loc13_24: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc13_24: = bound_method %int.sadd, %impl.elem0.loc13_24 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc13_24: = specific_function %Convert.bound.loc13_24, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %Convert.specific_fn.loc13_24: = specific_function %Convert.bound.loc13_24, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %.loc13_24.1: %i32 = value_of_initializer %int.sadd [template = constants.%int_3.1] // CHECK:STDOUT: %.loc13_24.2: %i32 = converted %int.sadd, %.loc13_24.1 [template = constants.%int_3.1] // CHECK:STDOUT: %int.convert_checked.loc13_24: init Core.IntLiteral = call %Convert.specific_fn.loc13_24(%.loc13_24.2) [template = constants.%int_3.2] @@ -120,5 +110,5 @@ var arr: [i32; Add(1, 2)]; // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Add(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.sadd"; +// CHECK:STDOUT: fn @Add.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.sadd"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/builtin/definition.carbon b/toolchain/check/testdata/function/builtin/definition.carbon index d37f0479c322..7e23baf037f0 100644 --- a/toolchain/check/testdata/function/builtin/definition.carbon +++ b/toolchain/check/testdata/function/builtin/definition.carbon @@ -14,16 +14,14 @@ fn Add(a: i32, b: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Add.type: type = fn_type @Add [template] // CHECK:STDOUT: %Add: %Add.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -44,17 +42,11 @@ fn Add(a: i32, b: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // 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_11.1: type = value_of_initializer %int.make_type_signed.loc11_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed.loc11_11, %.loc11_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_19: init type = call constants.%Int(%int_32.loc11_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_signed.loc11_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_signed.loc11_19, %.loc11_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_27: init type = call constants.%Int(%int_32.loc11_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_27.1: type = value_of_initializer %int.make_type_signed.loc11_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_27.2: type = converted %int.make_type_signed.loc11_27, %.loc11_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 diff --git a/toolchain/check/testdata/function/builtin/fail_redefined.carbon b/toolchain/check/testdata/function/builtin/fail_redefined.carbon index b7c85e15afd1..6cdd3ec65d33 100644 --- a/toolchain/check/testdata/function/builtin/fail_redefined.carbon +++ b/toolchain/check/testdata/function/builtin/fail_redefined.carbon @@ -41,9 +41,7 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] @@ -54,7 +52,7 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -77,17 +75,11 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%int_32.loc11_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed.loc11_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed.loc11_9, %.loc11_9.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_17: init type = call constants.%Int(%int_32.loc11_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.1: type = value_of_initializer %int.make_type_signed.loc11_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.2: type = converted %int.make_type_signed.loc11_17, %.loc11_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_25: init type = call constants.%Int(%int_32.loc11_25) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.1: type = value_of_initializer %int.make_type_signed.loc11_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.2: type = converted %int.make_type_signed.loc11_25, %.loc11_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param.loc11: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n.loc11: %i32 = bind_name n, %n.param.loc11 // CHECK:STDOUT: %m.param.loc11: %i32 = value_param runtime_param1 @@ -104,17 +96,11 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc19_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc19_9: init type = call constants.%Int(%int_32.loc19_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_9.1: type = value_of_initializer %int.make_type_signed.loc19_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_9.2: type = converted %int.make_type_signed.loc19_9, %.loc19_9.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc19_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc19_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc19_17: init type = call constants.%Int(%int_32.loc19_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_17.1: type = value_of_initializer %int.make_type_signed.loc19_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_17.2: type = converted %int.make_type_signed.loc19_17, %.loc19_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc19_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc19_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc19_25: init type = call constants.%Int(%int_32.loc19_25) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_25.1: type = value_of_initializer %int.make_type_signed.loc19_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_25.2: type = converted %int.make_type_signed.loc19_25, %.loc19_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc19_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param.loc19: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n.loc19: %i32 = bind_name n, %n.param.loc19 // CHECK:STDOUT: %m.param.loc19: %i32 = value_param runtime_param1 @@ -131,17 +117,11 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc21_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21_9: init type = call constants.%Int(%int_32.loc21_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_9.1: type = value_of_initializer %int.make_type_signed.loc21_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_9.2: type = converted %int.make_type_signed.loc21_9, %.loc21_9.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc21_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc21_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21_17: init type = call constants.%Int(%int_32.loc21_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_17.1: type = value_of_initializer %int.make_type_signed.loc21_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_17.2: type = converted %int.make_type_signed.loc21_17, %.loc21_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc21_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc21_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21_25: init type = call constants.%Int(%int_32.loc21_25) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_25.1: type = value_of_initializer %int.make_type_signed.loc21_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_25.2: type = converted %int.make_type_signed.loc21_25, %.loc21_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc21_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param.loc21: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n.loc21: %i32 = bind_name n, %n.param.loc21 // CHECK:STDOUT: %m.param.loc21: %i32 = value_param runtime_param1 @@ -158,17 +138,11 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc29_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc29_9: init type = call constants.%Int(%int_32.loc29_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc29_9.1: type = value_of_initializer %int.make_type_signed.loc29_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc29_9.2: type = converted %int.make_type_signed.loc29_9, %.loc29_9.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc29_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc29_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc29_17: init type = call constants.%Int(%int_32.loc29_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc29_17.1: type = value_of_initializer %int.make_type_signed.loc29_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc29_17.2: type = converted %int.make_type_signed.loc29_17, %.loc29_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc29_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc29_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc29_25: init type = call constants.%Int(%int_32.loc29_25) [template = constants.%i32] -// CHECK:STDOUT: %.loc29_25.1: type = value_of_initializer %int.make_type_signed.loc29_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc29_25.2: type = converted %int.make_type_signed.loc29_25, %.loc29_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc29_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param.loc29: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n.loc29: %i32 = bind_name n, %n.param.loc29 // CHECK:STDOUT: %m.param.loc29: %i32 = value_param runtime_param1 @@ -185,17 +159,11 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc31_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc31_9: init type = call constants.%Int(%int_32.loc31_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc31_9.1: type = value_of_initializer %int.make_type_signed.loc31_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc31_9.2: type = converted %int.make_type_signed.loc31_9, %.loc31_9.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc31_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc31_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc31_17: init type = call constants.%Int(%int_32.loc31_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc31_17.1: type = value_of_initializer %int.make_type_signed.loc31_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc31_17.2: type = converted %int.make_type_signed.loc31_17, %.loc31_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc31_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc31_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc31_25: init type = call constants.%Int(%int_32.loc31_25) [template = constants.%i32] -// CHECK:STDOUT: %.loc31_25.1: type = value_of_initializer %int.make_type_signed.loc31_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc31_25.2: type = converted %int.make_type_signed.loc31_25, %.loc31_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc31_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param.loc31: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n.loc31: %i32 = bind_name n, %n.param.loc31 // CHECK:STDOUT: %m.param.loc31: %i32 = value_param runtime_param1 @@ -212,17 +180,11 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc38_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc38_9: init type = call constants.%Int(%int_32.loc38_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc38_9.1: type = value_of_initializer %int.make_type_signed.loc38_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc38_9.2: type = converted %int.make_type_signed.loc38_9, %.loc38_9.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc38_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc38_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc38_17: init type = call constants.%Int(%int_32.loc38_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc38_17.1: type = value_of_initializer %int.make_type_signed.loc38_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc38_17.2: type = converted %int.make_type_signed.loc38_17, %.loc38_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc38_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc38_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc38_25: init type = call constants.%Int(%int_32.loc38_25) [template = constants.%i32] -// CHECK:STDOUT: %.loc38_25.1: type = value_of_initializer %int.make_type_signed.loc38_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc38_25.2: type = converted %int.make_type_signed.loc38_25, %.loc38_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc38_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param.loc38: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n.loc38: %i32 = bind_name n, %n.param.loc38 // CHECK:STDOUT: %m.param.loc38: %i32 = value_param runtime_param1 diff --git a/toolchain/check/testdata/function/builtin/method.carbon b/toolchain/check/testdata/function/builtin/method.carbon index 429893efdee8..0e484d50fbbe 100644 --- a/toolchain/check/testdata/function/builtin/method.carbon +++ b/toolchain/check/testdata/function/builtin/method.carbon @@ -29,37 +29,35 @@ var arr: [i32; (1 as i32).(I.F)(2)]; // CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %I.type, %F.type.1 [template] // CHECK:STDOUT: %assoc0.1: %F.assoc_type = assoc_entity element0, @I.%F.decl [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %I.facet: %I.type = facet_value %i32, %i32 [template] // CHECK:STDOUT: %interface.1: = interface_witness (%F.2) [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @As(%i32) [template] -// CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.2, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.7, @impl.6(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] -// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.7(%int_32) [template] +// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.2, @ImplicitAs(Core.IntLiteral) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.5, @impl.4(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.5(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %F.bound: = bound_method %int_1.2, %F.2 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.2, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.16: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.16: %Convert.type.16 = struct_value () [template] -// CHECK:STDOUT: %interface.11: = interface_witness (%Convert.16) [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.16 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @ImplicitAs(%i32) [template] +// CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [template] +// CHECK:STDOUT: %interface.7: = interface_witness (%Convert.12) [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.12 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.3(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %int_3.1: %i32 = int_value 3 [template] -// CHECK:STDOUT: %Convert.type.17: type = fn_type @Convert.5, @impl.4(%int_32) [template] -// CHECK:STDOUT: %Convert.17: %Convert.type.17 = struct_value () [template] -// CHECK:STDOUT: %interface.12: = interface_witness (%Convert.17) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.17 [template] -// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.5(%int_32) [template] +// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.4, @impl.3(%int_32) [template] +// CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] +// CHECK:STDOUT: %interface.8: = interface_witness (%Convert.13) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.13 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] // CHECK:STDOUT: %int_3.2: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %array_type: type = array_type %int_3.2, %i32 [template] // CHECK:STDOUT: } @@ -67,8 +65,8 @@ var arr: [i32; (1 as i32).(I.F)(2)]; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .As = %import_ref.2 -// CHECK:STDOUT: .ImplicitAs = %import_ref.38 +// CHECK:STDOUT: .As = %import_ref.5 +// CHECK:STDOUT: .ImplicitAs = %import_ref.193 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -84,21 +82,17 @@ var arr: [i32; (1 as i32).(I.F)(2)]; // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // 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: %.loc15_6.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_6.2: type = converted %int.make_type_signed, %.loc15_6.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: %int_32.loc19_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc19_11: init type = call constants.%Int(%int_32.loc19_11) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc19_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_32.loc19_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc19_22: init type = call constants.%Int(%int_32.loc19_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_22.1: type = value_of_initializer %int.make_type_signed.loc19_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_22.2: type = converted %int.make_type_signed.loc19_22, %.loc19_22.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc19_19: %Convert.type.2 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %i32.loc19_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc19_19: %Convert.type.2 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc19_19: = bound_method %int_1, %impl.elem0.loc19_19 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc19_19: = specific_function %Convert.bound.loc19_19, @Convert.7(constants.%int_32) [template = constants.%Convert.specific_fn.1] +// CHECK:STDOUT: %Convert.specific_fn.loc19_19: = specific_function %Convert.bound.loc19_19, @Convert.5(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc19_19: init %i32 = call %Convert.specific_fn.loc19_19(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc19_19.1: %i32 = value_of_initializer %int.convert_checked.loc19_19 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc19_19.2: %i32 = converted %int_1, %.loc19_19.1 [template = constants.%int_1.2] @@ -107,18 +101,16 @@ var arr: [i32; (1 as i32).(I.F)(2)]; // CHECK:STDOUT: %impl.elem0.loc19_26: %F.type.1 = interface_witness_access constants.%interface.1, element0 [template = constants.%F.2] // CHECK:STDOUT: %F.bound: = bound_method %.loc19_19.2, %impl.elem0.loc19_26 [template = constants.%F.bound] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc19_33: %Convert.type.15 = interface_witness_access constants.%interface.11, element0 [template = constants.%Convert.16] +// CHECK:STDOUT: %impl.elem0.loc19_33: %Convert.type.11 = interface_witness_access constants.%interface.7, element0 [template = constants.%Convert.12] // CHECK:STDOUT: %Convert.bound.loc19_33: = bound_method %int_2, %impl.elem0.loc19_33 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc19_33: = specific_function %Convert.bound.loc19_33, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc19_33: init %i32 = call %Convert.specific_fn.loc19_33(%int_2) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc19_33.1: %i32 = value_of_initializer %int.convert_checked.loc19_33 [template = constants.%int_2.2] // CHECK:STDOUT: %.loc19_33.2: %i32 = converted %int_2, %.loc19_33.1 [template = constants.%int_2.2] // CHECK:STDOUT: %int.sadd: init %i32 = call %F.bound(%.loc19_19.2, %.loc19_33.2) [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc19_11.1: type = value_of_initializer %int.make_type_signed.loc19_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_11.2: type = converted %int.make_type_signed.loc19_11, %.loc19_11.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc19_34: %Convert.type.7 = interface_witness_access constants.%interface.12, element0 [template = constants.%Convert.17] +// CHECK:STDOUT: %impl.elem0.loc19_34: %Convert.type.6 = interface_witness_access constants.%interface.8, element0 [template = constants.%Convert.13] // CHECK:STDOUT: %Convert.bound.loc19_34: = bound_method %int.sadd, %impl.elem0.loc19_34 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc19_34: = specific_function %Convert.bound.loc19_34, @Convert.5(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %Convert.specific_fn.loc19_34: = specific_function %Convert.bound.loc19_34, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %.loc19_34.1: %i32 = value_of_initializer %int.sadd [template = constants.%int_3.1] // CHECK:STDOUT: %.loc19_34.2: %i32 = converted %int.sadd, %.loc19_34.1 [template = constants.%int_3.1] // CHECK:STDOUT: %int.convert_checked.loc19_34: init Core.IntLiteral = call %Convert.specific_fn.loc19_34(%.loc19_34.2) [template = constants.%int_3.2] @@ -163,7 +155,7 @@ var arr: [i32; (1 as i32).(I.F)(2)]; // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: %.loc15_6.2 as %I.ref { +// CHECK:STDOUT: impl @impl.1: %i32 as %I.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %self.patt: %i32 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %i32 = value_param_pattern %self.patt, runtime_param0 @@ -173,17 +165,11 @@ var arr: [i32; (1 as i32).(I.F)(2)]; // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc16_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc16_14: init type = call constants.%Int(%int_32.loc16_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_14.1: type = value_of_initializer %int.make_type_signed.loc16_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_14.2: type = converted %int.make_type_signed.loc16_14, %.loc16_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc16_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc16_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc16_26: init type = call constants.%Int(%int_32.loc16_26) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_26.1: type = value_of_initializer %int.make_type_signed.loc16_26 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_26.2: type = converted %int.make_type_signed.loc16_26, %.loc16_26.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc16_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc16_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc16_34: init type = call constants.%Int(%int_32.loc16_34) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_34.1: type = value_of_initializer %int.make_type_signed.loc16_34 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_34.2: type = converted %int.make_type_signed.loc16_34, %.loc16_34.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc16_34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %self: %i32 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %i32 = value_param runtime_param1 diff --git a/toolchain/check/testdata/function/builtin/no_prelude/adapted_type.carbon b/toolchain/check/testdata/function/builtin/no_prelude/adapted_type.carbon index 2a37adfeccee..a48d4495fe86 100644 --- a/toolchain/check/testdata/function/builtin/no_prelude/adapted_type.carbon +++ b/toolchain/check/testdata/function/builtin/no_prelude/adapted_type.carbon @@ -56,10 +56,10 @@ fn Int(N: MyIntLiteral) -> type = "int.make_type_signed"; // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %MyInt32: type = class_type @MyInt32 [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %Make: %Make.type = struct_value () [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32 [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32.builtin [template] // CHECK:STDOUT: %MyAdd.type: type = fn_type @MyAdd [template] // CHECK:STDOUT: %MyAdd: %MyAdd.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] @@ -154,9 +154,9 @@ fn Int(N: MyIntLiteral) -> type = "int.make_type_signed"; // CHECK:STDOUT: %MyIntLiteral.ref: type = name_ref MyIntLiteral, file.%MyIntLiteral.decl [template = constants.%MyIntLiteral] // CHECK:STDOUT: %.loc13_16.1: %MyIntLiteral = as_compatible %int_32 [template = constants.%int_32] // CHECK:STDOUT: %.loc13_16.2: %MyIntLiteral = converted %int_32, %.loc13_16.1 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%.loc13_16.2) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_32.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_32.2: type = converted %int.make_type_signed, %.loc13_32.1 [template = constants.%i32] +// CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%.loc13_16.2) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc13_32.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc13_32.2: type = converted %int.make_type_signed, %.loc13_32.1 [template = constants.%i32.builtin] // CHECK:STDOUT: adapt_decl %.loc13_32.2 [template] // CHECK:STDOUT: %Make.decl: %Make.type = fn_decl @Make [template = constants.%Make] { // CHECK:STDOUT: %a.patt: %MyIntLiteral = binding_pattern a @@ -171,7 +171,7 @@ fn Int(N: MyIntLiteral) -> type = "int.make_type_signed"; // CHECK:STDOUT: %return.param.loc15: ref %MyInt32 = out_param runtime_param1 // CHECK:STDOUT: %return.loc15: ref %MyInt32 = return_slot %return.param.loc15 // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %i32 [template = constants.%complete_type.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %i32.builtin [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%MyInt32 diff --git a/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon b/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon index 930f2a6bc9d0..6175929c4151 100644 --- a/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon +++ b/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon @@ -84,24 +84,24 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Convert.assoc_type.2: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.2 [symbolic] // CHECK:STDOUT: %assoc0.3: %Convert.assoc_type.2 = assoc_entity element0, @ImplicitAs.%Convert.decl [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %i32, %i32 [template] +// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %i32.builtin, %i32.builtin [template] // CHECK:STDOUT: %interface.1: = interface_witness (%Op.2) [template] -// CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%i32)> [template] +// CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%i32.builtin)> [template] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3 [template] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [template] -// CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.1, @As(%i32) [template] +// CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.1, @As(%i32.builtin) [template] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [template] // CHECK:STDOUT: %Convert.assoc_type.3: type = assoc_entity_type %As.type.3, %Convert.type.4 [template] // CHECK:STDOUT: %assoc0.4: %Convert.assoc_type.3 = assoc_entity element0, @As.%Convert.decl [template] // CHECK:STDOUT: %As.facet: %As.type.2 = facet_value Core.IntLiteral, Core.IntLiteral [symbolic] // CHECK:STDOUT: %interface.2: = interface_witness (%Convert.3) [template] -// CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template] +// CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(%i32.builtin)> [template] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.4 [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.2, @ImplicitAs(%i32) [template] +// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.2, @ImplicitAs(%i32.builtin) [template] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [template] // CHECK:STDOUT: %Convert.assoc_type.4: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.6 [template] // CHECK:STDOUT: %assoc0.5: %Convert.assoc_type.4 = assoc_entity element0, @ImplicitAs.%Convert.decl [template] @@ -114,7 +114,7 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [template] // CHECK:STDOUT: %Convert.assoc_type.5: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.8 [template] // CHECK:STDOUT: %assoc0.6: %Convert.assoc_type.5 = assoc_entity element0, @ImplicitAs.%Convert.decl [template] -// CHECK:STDOUT: %ImplicitAs.facet.2: %ImplicitAs.type.2 = facet_value %i32, %i32 [symbolic] +// CHECK:STDOUT: %ImplicitAs.facet.2: %ImplicitAs.type.2 = facet_value %i32.builtin, %i32.builtin [symbolic] // CHECK:STDOUT: %interface.4: = interface_witness (%Convert.7) [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -165,9 +165,9 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // 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: %.loc19_6.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc19_6.2: type = converted %int.make_type_signed, %.loc19_6.1 [template = constants.%i32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc19_6.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc19_6.2: type = converted %int.make_type_signed, %.loc19_6.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %Add.ref: type = name_ref Add, file.%Add.decl [template = constants.%Add.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] {} { @@ -177,10 +177,10 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %.loc23_17.2: type = converted %int_literal.make_type, %.loc23_17.1 [template = Core.IntLiteral] // CHECK:STDOUT: %As.ref: %As.type.1 = name_ref As, file.%As.decl [template = constants.%As.generic] // 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: %.loc23_28.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc23_28.2: type = converted %int.make_type_signed, %.loc23_28.1 [template = constants.%i32] -// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(constants.%i32)> [template = constants.%As.type.3] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc23_28.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc23_28.2: type = converted %int.make_type_signed, %.loc23_28.1 [template = constants.%i32.builtin] +// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(constants.%i32.builtin)> [template = constants.%As.type.3] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.3 [template] {} { // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] @@ -189,16 +189,16 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %.loc27_17.2: type = converted %int_literal.make_type, %.loc27_17.1 [template = Core.IntLiteral] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, file.%ImplicitAs.decl [template = constants.%ImplicitAs.generic] // 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: %.loc27_36.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc27_36.2: type = converted %int.make_type_signed, %.loc27_36.1 [template = constants.%i32] -// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%i32)> [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc27_36.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc27_36.2: type = converted %int.make_type_signed, %.loc27_36.1 [template = constants.%i32.builtin] +// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%i32.builtin)> [template = constants.%ImplicitAs.type.3] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.4 [template] {} { // 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: %.loc31_6.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc31_6.2: type = converted %int.make_type_signed, %.loc31_6.1 [template = constants.%i32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc31_6.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc31_6.2: type = converted %int.make_type_signed, %.loc31_6.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, file.%ImplicitAs.decl [template = constants.%ImplicitAs.generic] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] @@ -322,22 +322,22 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %.loc19_6.2 as %Add.ref { // CHECK:STDOUT: %Op.decl: %Op.type.2 = fn_decl @Op.2 [template = constants.%Op.2] { -// CHECK:STDOUT: %self.patt: %i32 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %i32 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %other.patt: %i32 = binding_pattern other -// CHECK:STDOUT: %other.param_patt: %i32 = value_param_pattern %other.patt, runtime_param1 -// CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 +// CHECK:STDOUT: %self.patt: %i32.builtin = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %i32.builtin = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %other.patt: %i32.builtin = binding_pattern other +// CHECK:STDOUT: %other.param_patt: %i32.builtin = value_param_pattern %other.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: %i32.builtin = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %i32.builtin = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc20_15: type = name_ref Self, @impl.1.%.loc19_6.2 [template = constants.%i32] -// CHECK:STDOUT: %Self.ref.loc20_28: type = name_ref Self, @impl.1.%.loc19_6.2 [template = constants.%i32] -// CHECK:STDOUT: %Self.ref.loc20_37: type = name_ref Self, @impl.1.%.loc19_6.2 [template = constants.%i32] -// CHECK:STDOUT: %self.param: %i32 = value_param runtime_param0 -// CHECK:STDOUT: %self: %i32 = bind_name self, %self.param -// CHECK:STDOUT: %other.param: %i32 = value_param runtime_param1 -// CHECK:STDOUT: %other: %i32 = bind_name other, %other.param -// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 -// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param +// CHECK:STDOUT: %Self.ref.loc20_15: type = name_ref Self, @impl.1.%.loc19_6.2 [template = constants.%i32.builtin] +// CHECK:STDOUT: %Self.ref.loc20_28: type = name_ref Self, @impl.1.%.loc19_6.2 [template = constants.%i32.builtin] +// CHECK:STDOUT: %Self.ref.loc20_37: type = name_ref Self, @impl.1.%.loc19_6.2 [template = constants.%i32.builtin] +// CHECK:STDOUT: %self.param: %i32.builtin = value_param runtime_param0 +// CHECK:STDOUT: %self: %i32.builtin = bind_name self, %self.param +// CHECK:STDOUT: %other.param: %i32.builtin = value_param runtime_param1 +// CHECK:STDOUT: %other: %i32.builtin = bind_name other, %other.param +// CHECK:STDOUT: %return.param: ref %i32.builtin = out_param runtime_param2 +// CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.1] // CHECK:STDOUT: @@ -350,18 +350,18 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Convert.decl: %Convert.type.3 = fn_decl @Convert.3 [template = constants.%Convert.3] { // CHECK:STDOUT: %self.patt: Core.IntLiteral = binding_pattern self // CHECK:STDOUT: %self.param_patt: Core.IntLiteral = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: %i32.builtin = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %i32.builtin = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.2.%.loc23_17.2 [template = Core.IntLiteral] // 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: %.loc24_31.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc24_31.2: type = converted %int.make_type_signed, %.loc24_31.1 [template = constants.%i32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc24_31.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc24_31.2: type = converted %int.make_type_signed, %.loc24_31.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %self.param: Core.IntLiteral = value_param runtime_param0 // CHECK:STDOUT: %self: Core.IntLiteral = bind_name self, %self.param -// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %i32.builtin = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %interface: = interface_witness (%Convert.decl) [template = constants.%interface.2] // CHECK:STDOUT: @@ -374,18 +374,18 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Convert.decl: %Convert.type.5 = fn_decl @Convert.4 [template = constants.%Convert.5] { // CHECK:STDOUT: %self.patt: Core.IntLiteral = binding_pattern self // CHECK:STDOUT: %self.param_patt: Core.IntLiteral = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: %i32.builtin = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %i32.builtin = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.3.%.loc27_17.2 [template = Core.IntLiteral] // 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: %.loc28_31.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc28_31.2: type = converted %int.make_type_signed, %.loc28_31.1 [template = constants.%i32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc28_31.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc28_31.2: type = converted %int.make_type_signed, %.loc28_31.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %self.param: Core.IntLiteral = value_param runtime_param0 // CHECK:STDOUT: %self: Core.IntLiteral = bind_name self, %self.param -// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %i32.builtin = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %interface: = interface_witness (%Convert.decl) [template = constants.%interface.3] // CHECK:STDOUT: @@ -396,18 +396,18 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.4: %.loc31_6.2 as %ImplicitAs.type { // CHECK:STDOUT: %Convert.decl: %Convert.type.7 = fn_decl @Convert.5 [template = constants.%Convert.7] { -// CHECK:STDOUT: %self.patt: %i32 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %i32 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %i32.builtin = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %i32.builtin = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.4.%.loc31_6.2 [template = constants.%i32] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.4.%.loc31_6.2 [template = constants.%i32.builtin] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc32_42.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] // CHECK:STDOUT: %.loc32_42.2: type = converted %int_literal.make_type, %.loc32_42.1 [template = Core.IntLiteral] -// CHECK:STDOUT: %self.param: %i32 = value_param runtime_param0 -// CHECK:STDOUT: %self: %i32 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %i32.builtin = value_param runtime_param0 +// CHECK:STDOUT: %self: %i32.builtin = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param runtime_param1 // CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param // CHECK:STDOUT: } @@ -447,13 +447,13 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: fn[%self.param_patt: @Convert.2.%Self.as_type.loc16_20.1 (%Self.as_type.3)]() -> @Convert.2.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2[%self.param_patt: %i32](%other.param_patt: %i32) -> %i32 = "int.sadd"; +// CHECK:STDOUT: fn @Op.2[%self.param_patt: %i32.builtin](%other.param_patt: %i32.builtin) -> %i32.builtin = "int.sadd"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Convert.3[%self.param_patt: Core.IntLiteral]() -> %i32 = "int.convert_checked"; +// CHECK:STDOUT: fn @Convert.3[%self.param_patt: Core.IntLiteral]() -> %i32.builtin = "int.convert_checked"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Convert.4[%self.param_patt: Core.IntLiteral]() -> %i32 = "int.convert_checked"; +// CHECK:STDOUT: fn @Convert.4[%self.param_patt: Core.IntLiteral]() -> %i32.builtin = "int.convert_checked"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Convert.5[%self.param_patt: %i32]() -> Core.IntLiteral = "int.convert_checked"; +// CHECK:STDOUT: fn @Convert.5[%self.param_patt: %i32.builtin]() -> Core.IntLiteral = "int.convert_checked"; // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.1(constants.%Self.1) { // CHECK:STDOUT: %Self => constants.%Self.1 @@ -506,12 +506,12 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.1(constants.%Add.facet) { // CHECK:STDOUT: %Self => constants.%Add.facet -// CHECK:STDOUT: %Self.as_type.loc8_15.1 => constants.%i32 +// CHECK:STDOUT: %Self.as_type.loc8_15.1 => constants.%i32.builtin // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @As(constants.%i32) { -// CHECK:STDOUT: %T.loc11_14.2 => constants.%i32 -// CHECK:STDOUT: %T.patt.loc11_14.2 => constants.%i32 +// CHECK:STDOUT: specific @As(constants.%i32.builtin) { +// CHECK:STDOUT: %T.loc11_14.2 => constants.%i32.builtin +// CHECK:STDOUT: %T.patt.loc11_14.2 => constants.%i32.builtin // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %As.type => constants.%As.type.3 @@ -522,16 +522,16 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %assoc0.loc12_32.2 => constants.%assoc0.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%i32, constants.%As.facet) { -// CHECK:STDOUT: %T => constants.%i32 +// CHECK:STDOUT: specific @Convert.1(constants.%i32.builtin, constants.%As.facet) { +// CHECK:STDOUT: %T => constants.%i32.builtin // CHECK:STDOUT: %As.type => constants.%As.type.3 // CHECK:STDOUT: %Self => constants.%As.facet // CHECK:STDOUT: %Self.as_type.loc12_20.1 => Core.IntLiteral // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%i32) { -// CHECK:STDOUT: %T.loc15_22.2 => constants.%i32 -// CHECK:STDOUT: %T.patt.loc15_22.2 => constants.%i32 +// CHECK:STDOUT: specific @ImplicitAs(constants.%i32.builtin) { +// CHECK:STDOUT: %T.loc15_22.2 => constants.%i32.builtin +// CHECK:STDOUT: %T.patt.loc15_22.2 => constants.%i32.builtin // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 @@ -542,8 +542,8 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %assoc0.loc16_32.2 => constants.%assoc0.5 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.2(constants.%i32, constants.%ImplicitAs.facet.1) { -// CHECK:STDOUT: %T => constants.%i32 +// CHECK:STDOUT: specific @Convert.2(constants.%i32.builtin, constants.%ImplicitAs.facet.1) { +// CHECK:STDOUT: %T => constants.%i32.builtin // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.1 // CHECK:STDOUT: %Self.as_type.loc16_20.1 => Core.IntLiteral @@ -566,7 +566,7 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T => Core.IntLiteral // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4 // CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.2 -// CHECK:STDOUT: %Self.as_type.loc16_20.1 => constants.%i32 +// CHECK:STDOUT: %Self.as_type.loc16_20.1 => constants.%i32.builtin // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- user.carbon @@ -575,7 +575,7 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // 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, %int_32 [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%T)> [symbolic] @@ -586,8 +586,8 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Self.as_type.1: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %Convert.assoc_type.1: type = assoc_entity_type %As.type.2, %Convert.type.1 [symbolic] // CHECK:STDOUT: %assoc0.1: %Convert.assoc_type.1 = assoc_entity element0, imports.%import_ref.6 [symbolic] -// CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%i32)> [template] -// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @As(%i32) [template] +// CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%i32.builtin)> [template] +// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @As(%i32.builtin) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] // CHECK:STDOUT: %Convert.assoc_type.2: type = assoc_entity_type %As.type.3, %Convert.type.2 [template] // CHECK:STDOUT: %assoc0.2: %Convert.assoc_type.2 = assoc_entity element0, imports.%import_ref.6 [template] @@ -596,13 +596,13 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Self.2: %Add.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.2: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic] // CHECK:STDOUT: %Self.3: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] -// CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template] +// CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(%i32.builtin)> [template] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.2, @ImplicitAs(%T) [symbolic] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic] // CHECK:STDOUT: %Self.as_type.2: type = facet_access_type %Self.3 [symbolic] // CHECK:STDOUT: %Convert.assoc_type.3: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.3 [symbolic] // CHECK:STDOUT: %assoc0.4: %Convert.assoc_type.3 = assoc_entity element0, imports.%import_ref.23 [symbolic] -// CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.2, @ImplicitAs(%i32) [template] +// CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.2, @ImplicitAs(%i32.builtin) [template] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [template] // CHECK:STDOUT: %Convert.assoc_type.4: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.4 [template] // CHECK:STDOUT: %assoc0.5: %Convert.assoc_type.4 = assoc_entity element0, imports.%import_ref.24 [template] @@ -615,10 +615,10 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [template] // CHECK:STDOUT: %interface.1: = interface_witness (%Convert.6) [template] // CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.6 [template] -// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_1.2: %i32.builtin = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.6 [template] -// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %int_2.2: %i32.builtin = int_value 2 [template] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %Self.as_type.3: type = facet_access_type %Self.2 [symbolic] // CHECK:STDOUT: %Op.assoc_type: type = assoc_entity_type %Add.type, %Op.type.1 [template] @@ -627,21 +627,21 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] // CHECK:STDOUT: %interface.2: = interface_witness (%Op.2) [template] // CHECK:STDOUT: %Op.bound.1: = bound_method %int_1.2, %Op.2 [template] -// CHECK:STDOUT: %int_3.1: %i32 = int_value 3 [template] +// CHECK:STDOUT: %int_3.1: %i32.builtin = int_value 3 [template] // CHECK:STDOUT: %assoc0.8: %Convert.assoc_type.3 = assoc_entity element0, imports.%import_ref.32 [symbolic] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.4 [template] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [template] // CHECK:STDOUT: %interface.3: = interface_witness (%Convert.7) [template] // CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.7 [template] // CHECK:STDOUT: %int_3.2: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %array_type: type = array_type %int_3.2, %i32 [template] +// CHECK:STDOUT: %array_type: type = array_type %int_3.2, %i32.builtin [template] // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] // CHECK:STDOUT: %Convert.bound.4: = bound_method %int_3.2, %Convert.6 [template] // CHECK:STDOUT: %Convert.bound.5: = bound_method %int_4.1, %Convert.6 [template] -// CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] +// CHECK:STDOUT: %int_4.2: %i32.builtin = int_value 4 [template] // CHECK:STDOUT: %Op.bound.2: = bound_method %int_3.1, %Op.2 [template] -// CHECK:STDOUT: %int_7: %i32 = int_value 7 [template] -// CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, %i32) [template] +// CHECK:STDOUT: %int_7: %i32.builtin = int_value 7 [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, %i32.builtin) [template] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.5 [template] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [template] @@ -666,7 +666,7 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %import_ref.8 = import_ref Core//default, inst38 [no loc], unloaded // CHECK:STDOUT: %import_ref.9: %Op.assoc_type = import_ref Core//default, loc8_41, loaded [template = constants.%assoc0.7] // CHECK:STDOUT: %import_ref.10 = import_ref Core//default, Op, unloaded -// CHECK:STDOUT: %import_ref.11: type = import_ref Core//default, loc19_6, loaded [template = constants.%i32] +// CHECK:STDOUT: %import_ref.11: type = import_ref Core//default, loc19_6, loaded [template = constants.%i32.builtin] // CHECK:STDOUT: %import_ref.12: type = import_ref Core//default, loc19_13, loaded [template = constants.%Add.type] // CHECK:STDOUT: %import_ref.13: = import_ref Core//default, loc19_17, loaded [template = constants.%interface.2] // CHECK:STDOUT: %import_ref.14: type = import_ref Core//default, loc23_17, loaded [template = Core.IntLiteral] @@ -679,7 +679,7 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %import_ref.21: type = import_ref Core//default, loc27_36, loaded [template = constants.%ImplicitAs.type.3] // CHECK:STDOUT: %import_ref.22: = import_ref Core//default, loc27_38, loaded [template = constants.%interface.4] // CHECK:STDOUT: %import_ref.23 = import_ref Core//default, loc16_32, unloaded -// CHECK:STDOUT: %import_ref.25: type = import_ref Core//default, loc31_6, loaded [template = constants.%i32] +// CHECK:STDOUT: %import_ref.25: type = import_ref Core//default, loc31_6, loaded [template = constants.%i32.builtin] // CHECK:STDOUT: %import_ref.26: type = import_ref Core//default, loc31_36, loaded [template = constants.%ImplicitAs.type.4] // CHECK:STDOUT: %import_ref.27: = import_ref Core//default, loc31_38, loaded [template = constants.%interface.3] // CHECK:STDOUT: } @@ -691,40 +691,40 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32] +// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32.builtin] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_32.loc4_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_22: init type = call constants.%Int(%int_32.loc4_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_22.1: type = value_of_initializer %int.make_type_signed.loc4_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_22.2: type = converted %int.make_type_signed.loc4_22, %.loc4_22.1 [template = constants.%i32] +// CHECK:STDOUT: %int.make_type_signed.loc4_22: init type = call constants.%Int(%int_32.loc4_22) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc4_22.1: type = value_of_initializer %int.make_type_signed.loc4_22 [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc4_22.2: type = converted %int.make_type_signed.loc4_22, %.loc4_22.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %impl.elem0.loc4_19: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.6] // CHECK:STDOUT: %Convert.bound.loc4_19: = bound_method %int_1, %impl.elem0.loc4_19 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init %i32 = call %Convert.bound.loc4_19(%int_1) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc4_19.1: %i32 = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc4_19.2: %i32 = converted %int_1, %.loc4_19.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.convert_checked.loc4_19: init %i32.builtin = call %Convert.bound.loc4_19(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc4_19.1: %i32.builtin = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc4_19.2: %i32.builtin = converted %int_1, %.loc4_19.1 [template = constants.%int_1.2] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %int_32.loc4_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_35: init type = call constants.%Int(%int_32.loc4_35) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_35.1: type = value_of_initializer %int.make_type_signed.loc4_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_35.2: type = converted %int.make_type_signed.loc4_35, %.loc4_35.1 [template = constants.%i32] +// CHECK:STDOUT: %int.make_type_signed.loc4_35: init type = call constants.%Int(%int_32.loc4_35) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc4_35.1: type = value_of_initializer %int.make_type_signed.loc4_35 [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc4_35.2: type = converted %int.make_type_signed.loc4_35, %.loc4_35.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %impl.elem0.loc4_32: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.6] // CHECK:STDOUT: %Convert.bound.loc4_32: = bound_method %int_2, %impl.elem0.loc4_32 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %int.convert_checked.loc4_32: init %i32 = call %Convert.bound.loc4_32(%int_2) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_32.1: %i32 = value_of_initializer %int.convert_checked.loc4_32 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_32.2: %i32 = converted %int_2, %.loc4_32.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %int.convert_checked.loc4_32: init %i32.builtin = call %Convert.bound.loc4_32(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_32.1: %i32.builtin = value_of_initializer %int.convert_checked.loc4_32 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_32.2: %i32.builtin = converted %int_2, %.loc4_32.1 [template = constants.%int_2.2] // CHECK:STDOUT: %impl.elem0.loc4_27.1: %Op.type.1 = interface_witness_access constants.%interface.2, element0 [template = constants.%Op.2] // CHECK:STDOUT: %Op.bound: = bound_method %.loc4_19.2, %impl.elem0.loc4_27.1 [template = constants.%Op.bound.1] -// CHECK:STDOUT: %int.sadd: init %i32 = call %Op.bound(%.loc4_19.2, %.loc4_32.2) [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %int.sadd: init %i32.builtin = call %Op.bound(%.loc4_19.2, %.loc4_32.2) [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %impl.elem0.loc4_27.2: %Convert.type.5 = interface_witness_access constants.%interface.3, element0 [template = constants.%Convert.7] // CHECK:STDOUT: %Convert.bound.loc4_27: = bound_method %int.sadd, %impl.elem0.loc4_27.2 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %.loc4_27.1: %i32 = value_of_initializer %int.sadd [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc4_27.2: %i32 = converted %int.sadd, %.loc4_27.1 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc4_27.1: %i32.builtin = value_of_initializer %int.sadd [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc4_27.2: %i32.builtin = converted %int.sadd, %.loc4_27.1 [template = constants.%int_3.1] // CHECK:STDOUT: %int.convert_checked.loc4_27: init Core.IntLiteral = call %Convert.bound.loc4_27(%.loc4_27.2) [template = constants.%int_3.2] // CHECK:STDOUT: %.loc4_27.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_27 [template = constants.%int_3.2] // CHECK:STDOUT: %.loc4_27.4: Core.IntLiteral = converted %int.sadd, %.loc4_27.3 [template = constants.%int_3.2] -// CHECK:STDOUT: %array_type: type = array_type %.loc4_27.4, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %array_type: type = array_type %.loc4_27.4, %i32.builtin [template = constants.%array_type] // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var // CHECK:STDOUT: } @@ -816,7 +816,7 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: fn[%self.param_patt: @Convert.2.%Self.as_type (%Self.as_type.2)]() -> @Convert.2.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Convert.3[%self.param_patt: Core.IntLiteral]() -> %i32 = "int.convert_checked" [from "core.carbon"]; +// CHECK:STDOUT: fn @Convert.3[%self.param_patt: Core.IntLiteral]() -> %i32.builtin = "int.convert_checked" [from "core.carbon"]; // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Op.1(constants.%Self.2: %Add.type) [from "core.carbon"] { // CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] @@ -825,11 +825,11 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: fn[%self.param_patt: @Op.1.%Self.as_type (%Self.as_type.3)](%other.param_patt: @Op.1.%Self.as_type (%Self.as_type.3)) -> @Op.1.%Self.as_type (%Self.as_type.3); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.2[%self.param_patt: %i32](%other.param_patt: %i32) -> %i32 = "int.sadd" [from "core.carbon"]; +// CHECK:STDOUT: fn @Op.2[%self.param_patt: %i32.builtin](%other.param_patt: %i32.builtin) -> %i32.builtin = "int.sadd" [from "core.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Convert.4[%self.param_patt: %i32]() -> Core.IntLiteral = "int.convert_checked" [from "core.carbon"]; +// CHECK:STDOUT: fn @Convert.4[%self.param_patt: %i32.builtin]() -> Core.IntLiteral = "int.convert_checked" [from "core.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Convert.5[%self.param_patt: Core.IntLiteral]() -> %i32 = "int.convert_checked" [from "core.carbon"]; +// CHECK:STDOUT: fn @Convert.5[%self.param_patt: Core.IntLiteral]() -> %i32.builtin = "int.convert_checked" [from "core.carbon"]; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: @@ -837,45 +837,45 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %int_4.loc4_47: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] // CHECK:STDOUT: %int_3.loc4_51: Core.IntLiteral = int_value 3 [template = constants.%int_3.2] // CHECK:STDOUT: %int_32.loc4_56: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_56: init type = call constants.%Int(%int_32.loc4_56) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_56.1: type = value_of_initializer %int.make_type_signed.loc4_56 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_56.2: type = converted %int.make_type_signed.loc4_56, %.loc4_56.1 [template = constants.%i32] +// CHECK:STDOUT: %int.make_type_signed.loc4_56: init type = call constants.%Int(%int_32.loc4_56) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc4_56.1: type = value_of_initializer %int.make_type_signed.loc4_56 [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc4_56.2: type = converted %int.make_type_signed.loc4_56, %.loc4_56.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %impl.elem0.loc4_53: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.6] // CHECK:STDOUT: %Convert.bound.loc4_53: = bound_method %int_3.loc4_51, %impl.elem0.loc4_53 [template = constants.%Convert.bound.4] -// CHECK:STDOUT: %int.convert_checked.loc4_53: init %i32 = call %Convert.bound.loc4_53(%int_3.loc4_51) [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc4_53.1: %i32 = value_of_initializer %int.convert_checked.loc4_53 [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc4_53.2: %i32 = converted %int_3.loc4_51, %.loc4_53.1 [template = constants.%int_3.1] +// CHECK:STDOUT: %int.convert_checked.loc4_53: init %i32.builtin = call %Convert.bound.loc4_53(%int_3.loc4_51) [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc4_53.1: %i32.builtin = value_of_initializer %int.convert_checked.loc4_53 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc4_53.2: %i32.builtin = converted %int_3.loc4_51, %.loc4_53.1 [template = constants.%int_3.1] // CHECK:STDOUT: %int_4.loc4_64: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] // CHECK:STDOUT: %int_32.loc4_69: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_69: init type = call constants.%Int(%int_32.loc4_69) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_69.1: type = value_of_initializer %int.make_type_signed.loc4_69 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_69.2: type = converted %int.make_type_signed.loc4_69, %.loc4_69.1 [template = constants.%i32] +// CHECK:STDOUT: %int.make_type_signed.loc4_69: init type = call constants.%Int(%int_32.loc4_69) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc4_69.1: type = value_of_initializer %int.make_type_signed.loc4_69 [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc4_69.2: type = converted %int.make_type_signed.loc4_69, %.loc4_69.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %impl.elem0.loc4_66: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.6] // CHECK:STDOUT: %Convert.bound.loc4_66: = bound_method %int_4.loc4_64, %impl.elem0.loc4_66 [template = constants.%Convert.bound.5] -// CHECK:STDOUT: %int.convert_checked.loc4_66: init %i32 = call %Convert.bound.loc4_66(%int_4.loc4_64) [template = constants.%int_4.2] -// CHECK:STDOUT: %.loc4_66.1: %i32 = value_of_initializer %int.convert_checked.loc4_66 [template = constants.%int_4.2] -// CHECK:STDOUT: %.loc4_66.2: %i32 = converted %int_4.loc4_64, %.loc4_66.1 [template = constants.%int_4.2] +// CHECK:STDOUT: %int.convert_checked.loc4_66: init %i32.builtin = call %Convert.bound.loc4_66(%int_4.loc4_64) [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc4_66.1: %i32.builtin = value_of_initializer %int.convert_checked.loc4_66 [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc4_66.2: %i32.builtin = converted %int_4.loc4_64, %.loc4_66.1 [template = constants.%int_4.2] // CHECK:STDOUT: %impl.elem0.loc4_61: %Op.type.1 = interface_witness_access constants.%interface.2, element0 [template = constants.%Op.2] // CHECK:STDOUT: %Op.bound: = bound_method %.loc4_53.2, %impl.elem0.loc4_61 [template = constants.%Op.bound.2] -// CHECK:STDOUT: %int.sadd: init %i32 = call %Op.bound(%.loc4_53.2, %.loc4_66.2) [template = constants.%int_7] +// CHECK:STDOUT: %int.sadd: init %i32.builtin = call %Op.bound(%.loc4_53.2, %.loc4_66.2) [template = constants.%int_7] // CHECK:STDOUT: %.loc4_73.1: %tuple.type = tuple_literal (%int_3.loc4_44, %int_4.loc4_47, %int.sadd) // CHECK:STDOUT: %impl.elem0.loc4_73.1: %Convert.type.4 = interface_witness_access constants.%interface.4, element0 [template = constants.%Convert.8] // CHECK:STDOUT: %Convert.bound.loc4_73.1: = bound_method %int_3.loc4_44, %impl.elem0.loc4_73.1 [template = constants.%Convert.bound.6] -// CHECK:STDOUT: %int.convert_checked.loc4_73.1: init %i32 = call %Convert.bound.loc4_73.1(%int_3.loc4_44) [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc4_73.2: init %i32 = converted %int_3.loc4_44, %int.convert_checked.loc4_73.1 [template = constants.%int_3.1] +// CHECK:STDOUT: %int.convert_checked.loc4_73.1: init %i32.builtin = call %Convert.bound.loc4_73.1(%int_3.loc4_44) [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc4_73.2: init %i32.builtin = converted %int_3.loc4_44, %int.convert_checked.loc4_73.1 [template = constants.%int_3.1] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] -// CHECK:STDOUT: %.loc4_73.3: ref %i32 = array_index file.%arr.var, %int_0 -// CHECK:STDOUT: %.loc4_73.4: init %i32 = initialize_from %.loc4_73.2 to %.loc4_73.3 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc4_73.3: ref %i32.builtin = array_index file.%arr.var, %int_0 +// CHECK:STDOUT: %.loc4_73.4: init %i32.builtin = initialize_from %.loc4_73.2 to %.loc4_73.3 [template = constants.%int_3.1] // CHECK:STDOUT: %impl.elem0.loc4_73.2: %Convert.type.4 = interface_witness_access constants.%interface.4, element0 [template = constants.%Convert.8] // CHECK:STDOUT: %Convert.bound.loc4_73.2: = bound_method %int_4.loc4_47, %impl.elem0.loc4_73.2 [template = constants.%Convert.bound.7] -// CHECK:STDOUT: %int.convert_checked.loc4_73.2: init %i32 = call %Convert.bound.loc4_73.2(%int_4.loc4_47) [template = constants.%int_4.2] -// CHECK:STDOUT: %.loc4_73.5: init %i32 = converted %int_4.loc4_47, %int.convert_checked.loc4_73.2 [template = constants.%int_4.2] +// CHECK:STDOUT: %int.convert_checked.loc4_73.2: init %i32.builtin = call %Convert.bound.loc4_73.2(%int_4.loc4_47) [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc4_73.5: init %i32.builtin = converted %int_4.loc4_47, %int.convert_checked.loc4_73.2 [template = constants.%int_4.2] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %.loc4_73.6: ref %i32 = array_index file.%arr.var, %int_1 -// CHECK:STDOUT: %.loc4_73.7: init %i32 = initialize_from %.loc4_73.5 to %.loc4_73.6 [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc4_73.6: ref %i32.builtin = array_index file.%arr.var, %int_1 +// CHECK:STDOUT: %.loc4_73.7: init %i32.builtin = initialize_from %.loc4_73.5 to %.loc4_73.6 [template = constants.%int_4.2] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %.loc4_73.8: ref %i32 = array_index file.%arr.var, %int_2 -// CHECK:STDOUT: %.loc4_73.9: init %i32 = initialize_from %int.sadd to %.loc4_73.8 [template = constants.%int_7] +// CHECK:STDOUT: %.loc4_73.8: ref %i32.builtin = array_index file.%arr.var, %int_2 +// CHECK:STDOUT: %.loc4_73.9: init %i32.builtin = initialize_from %int.sadd to %.loc4_73.8 [template = constants.%int_7] // CHECK:STDOUT: %.loc4_73.10: init %array_type = array_init (%.loc4_73.4, %.loc4_73.7, %.loc4_73.9) to file.%arr.var [template = constants.%array] // CHECK:STDOUT: %.loc4_74: init %array_type = converted %.loc4_73.1, %.loc4_73.10 [template = constants.%array] // CHECK:STDOUT: assign file.%arr.var, %.loc4_74 @@ -904,9 +904,9 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @As(constants.%i32) { -// CHECK:STDOUT: %T => constants.%i32 -// CHECK:STDOUT: %T.patt => constants.%i32 +// CHECK:STDOUT: specific @As(constants.%i32.builtin) { +// CHECK:STDOUT: %T => constants.%i32.builtin +// CHECK:STDOUT: %T.patt => constants.%i32.builtin // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %As.type => constants.%As.type.3 @@ -922,9 +922,9 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T.patt => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%i32) { -// CHECK:STDOUT: %T => constants.%i32 -// CHECK:STDOUT: %T.patt => constants.%i32 +// CHECK:STDOUT: specific @ImplicitAs(constants.%i32.builtin) { +// CHECK:STDOUT: %T => constants.%i32.builtin +// CHECK:STDOUT: %T.patt => constants.%i32.builtin // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 diff --git a/toolchain/check/testdata/function/builtin/no_prelude/import.carbon b/toolchain/check/testdata/function/builtin/no_prelude/import.carbon index b074158331dd..323b98e6ff1f 100644 --- a/toolchain/check/testdata/function/builtin/no_prelude/import.carbon +++ b/toolchain/check/testdata/function/builtin/no_prelude/import.carbon @@ -35,7 +35,7 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] = // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %AsI32.type: type = fn_type @AsI32 [template] // CHECK:STDOUT: %AsI32: %AsI32.type = struct_value () [template] // CHECK:STDOUT: %AsIntLiteral.type: type = fn_type @AsIntLiteral [template] @@ -77,67 +77,67 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] = // CHECK:STDOUT: %AsI32.decl: %AsI32.type = fn_decl @AsI32 [template = constants.%AsI32] { // CHECK:STDOUT: %a.patt: Core.IntLiteral = binding_pattern a // CHECK:STDOUT: %a.param_patt: Core.IntLiteral = value_param_pattern %a.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: %i32.builtin = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %i32.builtin = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc8_24.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] // CHECK:STDOUT: %.loc8_24.2: type = converted %int_literal.make_type, %.loc8_24.1 [template = Core.IntLiteral] // 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: %.loc8_30.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_30.2: type = converted %int.make_type_signed, %.loc8_30.1 [template = constants.%i32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc8_30.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc8_30.2: type = converted %int.make_type_signed, %.loc8_30.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %a.param: Core.IntLiteral = value_param runtime_param0 // CHECK:STDOUT: %a: Core.IntLiteral = bind_name a, %a.param -// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %i32.builtin = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %AsIntLiteral.decl: %AsIntLiteral.type = fn_decl @AsIntLiteral [template = constants.%AsIntLiteral] { -// CHECK:STDOUT: %a.patt: %i32 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %i32.builtin = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %i32.builtin = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // 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: %.loc9_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc9_20.2: type = converted %int.make_type_signed, %.loc9_20.1 [template = constants.%i32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc9_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc9_20.2: type = converted %int.make_type_signed, %.loc9_20.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc9_39.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] // CHECK:STDOUT: %.loc9_39.2: type = converted %int_literal.make_type, %.loc9_39.1 [template = Core.IntLiteral] -// CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 -// CHECK:STDOUT: %a: %i32 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %i32.builtin = value_param runtime_param0 +// CHECK:STDOUT: %a: %i32.builtin = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param runtime_param1 // CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAdd.decl: %TestAdd.type = fn_decl @TestAdd [template = constants.%TestAdd] { -// CHECK:STDOUT: %a.patt: %i32 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 -// CHECK:STDOUT: %b.patt: %i32 = binding_pattern b -// CHECK:STDOUT: %b.param_patt: %i32 = value_param_pattern %b.patt, runtime_param1 -// CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 +// CHECK:STDOUT: %a.patt: %i32.builtin = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %i32.builtin = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %b.patt: %i32.builtin = binding_pattern b +// CHECK:STDOUT: %b.param_patt: %i32.builtin = value_param_pattern %b.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: %i32.builtin = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %i32.builtin = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc11_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_15: init type = call constants.%Int(%int_32.loc11_15) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_15.1: type = value_of_initializer %int.make_type_signed.loc11_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_15.2: type = converted %int.make_type_signed.loc11_15, %.loc11_15.1 [template = constants.%i32] +// CHECK:STDOUT: %int.make_type_signed.loc11_15: init type = call constants.%Int(%int_32.loc11_15) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc11_15.1: type = value_of_initializer %int.make_type_signed.loc11_15 [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc11_15.2: type = converted %int.make_type_signed.loc11_15, %.loc11_15.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %int_32.loc11_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_23: init type = call constants.%Int(%int_32.loc11_23) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_23.1: type = value_of_initializer %int.make_type_signed.loc11_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_23.2: type = converted %int.make_type_signed.loc11_23, %.loc11_23.1 [template = constants.%i32] +// CHECK:STDOUT: %int.make_type_signed.loc11_23: init type = call constants.%Int(%int_32.loc11_23) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc11_23.1: type = value_of_initializer %int.make_type_signed.loc11_23 [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc11_23.2: type = converted %int.make_type_signed.loc11_23, %.loc11_23.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %int_32.loc11_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_31: init type = call constants.%Int(%int_32.loc11_31) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_31.1: type = value_of_initializer %int.make_type_signed.loc11_31 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_31.2: type = converted %int.make_type_signed.loc11_31, %.loc11_31.1 [template = constants.%i32] -// CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 -// CHECK:STDOUT: %a: %i32 = bind_name a, %a.param -// CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 -// CHECK:STDOUT: %b: %i32 = bind_name b, %b.param -// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 -// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param +// CHECK:STDOUT: %int.make_type_signed.loc11_31: init type = call constants.%Int(%int_32.loc11_31) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc11_31.1: type = value_of_initializer %int.make_type_signed.loc11_31 [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc11_31.2: type = converted %int.make_type_signed.loc11_31, %.loc11_31.1 [template = constants.%i32.builtin] +// CHECK:STDOUT: %a.param: %i32.builtin = value_param runtime_param0 +// CHECK:STDOUT: %a: %i32.builtin = bind_name a, %a.param +// CHECK:STDOUT: %b.param: %i32.builtin = value_param runtime_param1 +// CHECK:STDOUT: %b: %i32.builtin = bind_name b, %b.param +// CHECK:STDOUT: %return.param: ref %i32.builtin = out_param runtime_param2 +// CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -145,11 +145,11 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] = // CHECK:STDOUT: // CHECK:STDOUT: fn @Int(%N.param_patt: Core.IntLiteral) -> type = "int.make_type_signed"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @AsI32(%a.param_patt: Core.IntLiteral) -> %i32 = "int.convert_checked"; +// CHECK:STDOUT: fn @AsI32(%a.param_patt: Core.IntLiteral) -> %i32.builtin = "int.convert_checked"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @AsIntLiteral(%a.param_patt: %i32) -> Core.IntLiteral = "int.convert_checked"; +// CHECK:STDOUT: fn @AsIntLiteral(%a.param_patt: %i32.builtin) -> Core.IntLiteral = "int.convert_checked"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAdd(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.sadd"; +// CHECK:STDOUT: fn @TestAdd(%a.param_patt: %i32.builtin, %b.param_patt: %i32.builtin) -> %i32.builtin = "int.sadd"; // CHECK:STDOUT: // CHECK:STDOUT: --- use.carbon // CHECK:STDOUT: @@ -157,7 +157,7 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] = // 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, %int_32 [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %AsIntLiteral.type: type = fn_type @AsIntLiteral [template] // CHECK:STDOUT: %AsIntLiteral: %AsIntLiteral.type = struct_value () [template] // CHECK:STDOUT: %TestAdd.type: type = fn_type @TestAdd [template] @@ -165,13 +165,13 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] = // CHECK:STDOUT: %AsI32.type: type = fn_type @AsI32 [template] // CHECK:STDOUT: %AsI32: %AsI32.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_1.2: %i32.builtin = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] -// CHECK:STDOUT: %int_3.1: %i32 = int_value 3 [template] +// CHECK:STDOUT: %int_2.2: %i32.builtin = int_value 2 [template] +// CHECK:STDOUT: %int_3.1: %i32.builtin = int_value 3 [template] // CHECK:STDOUT: %int_3.2: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %array_type: type = array_type %int_3.2, %i32 [template] -// CHECK:STDOUT: %tuple.type: type = tuple_type (%i32, %i32, %i32) [template] +// CHECK:STDOUT: %array_type: type = array_type %int_3.2, %i32.builtin [template] +// CHECK:STDOUT: %tuple.type: type = tuple_type (%i32.builtin, %i32.builtin, %i32.builtin) [template] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.2, %int_2.2, %int_3.1) [template] // CHECK:STDOUT: } @@ -196,7 +196,7 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] = // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin] // CHECK:STDOUT: %Core.ref.loc4_16: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %AsIntLiteral.ref: %AsIntLiteral.type = name_ref AsIntLiteral, imports.%import_ref.2 [template = constants.%AsIntLiteral] // CHECK:STDOUT: %Core.ref.loc4_34: = name_ref Core, imports.%Core [template = imports.%Core] @@ -204,60 +204,60 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] = // CHECK:STDOUT: %Core.ref.loc4_47: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %AsI32.ref.loc4_51: %AsI32.type = name_ref AsI32, imports.%import_ref.4 [template = constants.%AsI32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %int.convert_checked.loc4_59: init %i32 = call %AsI32.ref.loc4_51(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %int.convert_checked.loc4_59: init %i32.builtin = call %AsI32.ref.loc4_51(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %Core.ref.loc4_62: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %AsI32.ref.loc4_66: %AsI32.type = name_ref AsI32, imports.%import_ref.4 [template = constants.%AsI32] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %int.convert_checked.loc4_74: init %i32 = call %AsI32.ref.loc4_66(%int_2) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_59.1: %i32 = value_of_initializer %int.convert_checked.loc4_59 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc4_59.2: %i32 = converted %int.convert_checked.loc4_59, %.loc4_59.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc4_74.1: %i32 = value_of_initializer %int.convert_checked.loc4_74 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_74.2: %i32 = converted %int.convert_checked.loc4_74, %.loc4_74.1 [template = constants.%int_2.2] -// CHECK:STDOUT: %int.sadd: init %i32 = call %TestAdd.ref(%.loc4_59.2, %.loc4_74.2) [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc4_75.1: %i32 = value_of_initializer %int.sadd [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc4_75.2: %i32 = converted %int.sadd, %.loc4_75.1 [template = constants.%int_3.1] +// CHECK:STDOUT: %int.convert_checked.loc4_74: init %i32.builtin = call %AsI32.ref.loc4_66(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_59.1: %i32.builtin = value_of_initializer %int.convert_checked.loc4_59 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc4_59.2: %i32.builtin = converted %int.convert_checked.loc4_59, %.loc4_59.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc4_74.1: %i32.builtin = value_of_initializer %int.convert_checked.loc4_74 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_74.2: %i32.builtin = converted %int.convert_checked.loc4_74, %.loc4_74.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %int.sadd: init %i32.builtin = call %TestAdd.ref(%.loc4_59.2, %.loc4_74.2) [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc4_75.1: %i32.builtin = value_of_initializer %int.sadd [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc4_75.2: %i32.builtin = converted %int.sadd, %.loc4_75.1 [template = constants.%int_3.1] // CHECK:STDOUT: %int.convert_checked.loc4_76: init Core.IntLiteral = call %AsIntLiteral.ref(%.loc4_75.2) [template = constants.%int_3.2] -// 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.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed, %.loc4_11.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %.loc4_76.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_76 [template = constants.%int_3.2] // CHECK:STDOUT: %.loc4_76.2: Core.IntLiteral = converted %int.convert_checked.loc4_76, %.loc4_76.1 [template = constants.%int_3.2] -// CHECK:STDOUT: %array_type: type = array_type %.loc4_76.2, %i32 [template = constants.%array_type] +// CHECK:STDOUT: %array_type: type = array_type %.loc4_76.2, %i32.builtin [template = constants.%array_type] // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int(%N.param_patt: Core.IntLiteral) -> type = "int.make_type_signed" [from "core.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @AsIntLiteral(%a.param_patt: %i32) -> Core.IntLiteral = "int.convert_checked" [from "core.carbon"]; +// CHECK:STDOUT: fn @AsIntLiteral(%a.param_patt: %i32.builtin) -> Core.IntLiteral = "int.convert_checked" [from "core.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAdd(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.sadd" [from "core.carbon"]; +// CHECK:STDOUT: fn @TestAdd(%a.param_patt: %i32.builtin, %b.param_patt: %i32.builtin) -> %i32.builtin = "int.sadd" [from "core.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @AsI32(%a.param_patt: Core.IntLiteral) -> %i32 = "int.convert_checked" [from "core.carbon"]; +// CHECK:STDOUT: fn @AsI32(%a.param_patt: Core.IntLiteral) -> %i32.builtin = "int.convert_checked" [from "core.carbon"]; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Core.ref.loc4_82: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %AsI32.ref.loc4_86: %AsI32.type = name_ref AsI32, imports.%import_ref.4 [template = constants.%AsI32] // CHECK:STDOUT: %int_1.loc4_93: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %int.convert_checked.loc4_94: init %i32 = call %AsI32.ref.loc4_86(%int_1.loc4_93) [template = constants.%int_1.2] +// CHECK:STDOUT: %int.convert_checked.loc4_94: init %i32.builtin = call %AsI32.ref.loc4_86(%int_1.loc4_93) [template = constants.%int_1.2] // CHECK:STDOUT: %Core.ref.loc4_97: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %AsI32.ref.loc4_101: %AsI32.type = name_ref AsI32, imports.%import_ref.4 [template = constants.%AsI32] // CHECK:STDOUT: %int_2.loc4_108: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %int.convert_checked.loc4_109: init %i32 = call %AsI32.ref.loc4_101(%int_2.loc4_108) [template = constants.%int_2.2] +// CHECK:STDOUT: %int.convert_checked.loc4_109: init %i32.builtin = call %AsI32.ref.loc4_101(%int_2.loc4_108) [template = constants.%int_2.2] // CHECK:STDOUT: %Core.ref.loc4_112: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %AsI32.ref.loc4_116: %AsI32.type = name_ref AsI32, imports.%import_ref.4 [template = constants.%AsI32] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.2] -// CHECK:STDOUT: %int.convert_checked.loc4_124: init %i32 = call %AsI32.ref.loc4_116(%int_3) [template = constants.%int_3.1] +// CHECK:STDOUT: %int.convert_checked.loc4_124: init %i32.builtin = call %AsI32.ref.loc4_116(%int_3) [template = constants.%int_3.1] // CHECK:STDOUT: %.loc4_125.1: %tuple.type = tuple_literal (%int.convert_checked.loc4_94, %int.convert_checked.loc4_109, %int.convert_checked.loc4_124) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] -// CHECK:STDOUT: %.loc4_125.2: ref %i32 = array_index file.%arr.var, %int_0 -// CHECK:STDOUT: %.loc4_125.3: init %i32 = initialize_from %int.convert_checked.loc4_94 to %.loc4_125.2 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc4_125.2: ref %i32.builtin = array_index file.%arr.var, %int_0 +// CHECK:STDOUT: %.loc4_125.3: init %i32.builtin = initialize_from %int.convert_checked.loc4_94 to %.loc4_125.2 [template = constants.%int_1.2] // CHECK:STDOUT: %int_1.loc4_125: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %.loc4_125.4: ref %i32 = array_index file.%arr.var, %int_1.loc4_125 -// CHECK:STDOUT: %.loc4_125.5: init %i32 = initialize_from %int.convert_checked.loc4_109 to %.loc4_125.4 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc4_125.4: ref %i32.builtin = array_index file.%arr.var, %int_1.loc4_125 +// CHECK:STDOUT: %.loc4_125.5: init %i32.builtin = initialize_from %int.convert_checked.loc4_109 to %.loc4_125.4 [template = constants.%int_2.2] // CHECK:STDOUT: %int_2.loc4_125: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %.loc4_125.6: ref %i32 = array_index file.%arr.var, %int_2.loc4_125 -// CHECK:STDOUT: %.loc4_125.7: init %i32 = initialize_from %int.convert_checked.loc4_124 to %.loc4_125.6 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc4_125.6: ref %i32.builtin = array_index file.%arr.var, %int_2.loc4_125 +// CHECK:STDOUT: %.loc4_125.7: init %i32.builtin = initialize_from %int.convert_checked.loc4_124 to %.loc4_125.6 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc4_125.8: init %array_type = array_init (%.loc4_125.3, %.loc4_125.5, %.loc4_125.7) to file.%arr.var [template = constants.%array] // CHECK:STDOUT: %.loc4_126: init %array_type = converted %.loc4_125.1, %.loc4_125.8 [template = constants.%array] // CHECK:STDOUT: assign file.%arr.var, %.loc4_126 diff --git a/toolchain/check/testdata/function/call/fail_not_callable.carbon b/toolchain/check/testdata/function/call/fail_not_callable.carbon index 1734c132b8ab..bf4252f75752 100644 --- a/toolchain/check/testdata/function/call/fail_not_callable.carbon +++ b/toolchain/check/testdata/function/call/fail_not_callable.carbon @@ -21,15 +21,13 @@ fn Run() { // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %str: String = string_literal "hello" [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -47,9 +45,7 @@ fn Run() { // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: // 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: %.loc15_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_10.2: type = converted %int.make_type_signed, %.loc15_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %x.var: ref %i32 = var x // CHECK:STDOUT: %x: ref %i32 = bind_name x, %x.var // CHECK:STDOUT: %str: String = string_literal "hello" [template = constants.%str] diff --git a/toolchain/check/testdata/function/call/fail_param_count.carbon b/toolchain/check/testdata/function/call/fail_param_count.carbon index 205cd54e9085..abfbc572e780 100644 --- a/toolchain/check/testdata/function/call/fail_param_count.carbon +++ b/toolchain/check/testdata/function/call/fail_param_count.carbon @@ -70,9 +70,7 @@ fn Main() { // CHECK:STDOUT: %Run0.type: type = fn_type @Run0 [template] // CHECK:STDOUT: %Run0: %Run0.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Run1.type: type = fn_type @Run1 [template] // CHECK:STDOUT: %Run1: %Run1.type = struct_value () [template] // CHECK:STDOUT: %Run2.type: type = fn_type @Run2 [template] @@ -85,7 +83,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -106,9 +104,7 @@ fn Main() { // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc12_12.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_12.2: type = converted %int.make_type_signed, %.loc12_12.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: } @@ -119,13 +115,9 @@ fn Main() { // CHECK:STDOUT: %b.param_patt: %i32 = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc13_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_12: init type = call constants.%Int(%int_32.loc13_12) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_12.1: type = value_of_initializer %int.make_type_signed.loc13_12 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_12.2: type = converted %int.make_type_signed.loc13_12, %.loc13_12.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_20: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_20: init type = call constants.%Int(%int_32.loc13_20) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_20.1: type = value_of_initializer %int.make_type_signed.loc13_20 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_20.2: type = converted %int.make_type_signed.loc13_20, %.loc13_20.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 diff --git a/toolchain/check/testdata/function/call/fail_param_type.carbon b/toolchain/check/testdata/function/call/fail_param_type.carbon index d8c62c916c50..d83e4bc2810e 100644 --- a/toolchain/check/testdata/function/call/fail_param_type.carbon +++ b/toolchain/check/testdata/function/call/fail_param_type.carbon @@ -27,10 +27,8 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -41,7 +39,7 @@ fn F() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -59,9 +57,7 @@ fn F() { // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // 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_9.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed, %.loc11_9.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon b/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon index 57f653b1e173..84f125a43aa5 100644 --- a/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon +++ b/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon @@ -32,16 +32,14 @@ fn Run() { // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Float = %import_ref.1 // CHECK:STDOUT: .Int = %import_ref.2 -// CHECK:STDOUT: .ImplicitAs = %import_ref.3 +// CHECK:STDOUT: .ImplicitAs = %import_ref.6 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -77,14 +75,12 @@ fn Run() { // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: // 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: %.loc20_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc20_10.2: type = converted %int.make_type_signed, %.loc20_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %x.var: ref %i32 = var x // CHECK:STDOUT: %x: ref %i32 = bind_name x, %x.var // CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %Foo.call: init f64 = call %Foo.ref() -// CHECK:STDOUT: %.loc20_21: %i32 = converted %Foo.call, [template = ] +// CHECK:STDOUT: %.loc20: %i32 = converted %Foo.call, [template = ] // CHECK:STDOUT: assign %x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/call/i32.carbon b/toolchain/check/testdata/function/call/i32.carbon index 066fe3a7a367..f86058a34f7d 100644 --- a/toolchain/check/testdata/function/call/i32.carbon +++ b/toolchain/check/testdata/function/call/i32.carbon @@ -20,19 +20,17 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Echo.type: type = fn_type @Echo [template] // CHECK:STDOUT: %Echo: %Echo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } @@ -40,7 +38,7 @@ fn Main() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -60,13 +58,9 @@ fn Main() { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_12: init type = call constants.%Int(%int_32.loc11_12) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_12.1: type = value_of_initializer %int.make_type_signed.loc11_12 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_12.2: type = converted %int.make_type_signed.loc11_12, %.loc11_12.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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_20.1: type = value_of_initializer %int.make_type_signed.loc11_20 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_20.2: type = converted %int.make_type_signed.loc11_20, %.loc11_20.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -84,14 +78,12 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // 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: %.loc16_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_10.2: type = converted %int.make_type_signed, %.loc16_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: %Echo.ref: %Echo.type = name_ref Echo, file.%Echo.decl [template = constants.%Echo] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/function/call/more_param_ir.carbon b/toolchain/check/testdata/function/call/more_param_ir.carbon index 6b972cdcea41..b506d7dd3fc9 100644 --- a/toolchain/check/testdata/function/call/more_param_ir.carbon +++ b/toolchain/check/testdata/function/call/more_param_ir.carbon @@ -20,10 +20,8 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] @@ -33,16 +31,16 @@ fn Main() { // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_1.2) [template] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %int_6.1: Core.IntLiteral = int_value 6 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_6.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_6.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_6.2: %i32 = int_value 6 [template] // CHECK:STDOUT: } @@ -50,7 +48,7 @@ fn Main() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -70,13 +68,9 @@ fn Main() { // CHECK:STDOUT: %b.param_patt: %i32 = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // 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_11.1: type = value_of_initializer %int.make_type_signed.loc11_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed.loc11_11, %.loc11_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_19: init type = call constants.%Int(%int_32.loc11_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_signed.loc11_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_signed.loc11_19, %.loc11_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -93,16 +87,14 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // 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: %.loc14_15.1: %tuple.type.1 = tuple_literal (%int.make_type_signed) -// CHECK:STDOUT: %.loc14_15.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_15.3: type = converted %int.make_type_signed, %.loc14_15.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_15.4: type = converted %.loc14_15.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_15.1: %tuple.type.1 = tuple_literal (%i32) +// CHECK:STDOUT: %.loc14_15.2: type = converted %.loc14_15.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %x.var: ref %tuple.type.2 = var x // CHECK:STDOUT: %x: ref %tuple.type.2 = bind_name x, %x.var // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc14_22.1: %tuple.type.3 = tuple_literal (%int_1) -// CHECK:STDOUT: %impl.elem0.loc14: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14: = bound_method %int_1, %impl.elem0.loc14 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc14: = specific_function %Convert.bound.loc14, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %Convert.specific_fn.loc14(%int_1) [template = constants.%int_1.2] @@ -116,7 +108,7 @@ fn Main() { // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %x.ref, element0 // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.1] // CHECK:STDOUT: %.loc16_8: %i32 = bind_value %tuple.elem0 -// CHECK:STDOUT: %impl.elem0.loc16: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc16: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc16: = bound_method %int_6, %impl.elem0.loc16 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc16: = specific_function %Convert.bound.loc16, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %Convert.specific_fn.loc16(%int_6) [template = constants.%int_6.2] diff --git a/toolchain/check/testdata/function/call/params_one.carbon b/toolchain/check/testdata/function/call/params_one.carbon index 7892a6019ba6..6fd70f091a0e 100644 --- a/toolchain/check/testdata/function/call/params_one.carbon +++ b/toolchain/check/testdata/function/call/params_one.carbon @@ -18,20 +18,18 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } @@ -39,7 +37,7 @@ fn Main() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -57,9 +55,7 @@ fn Main() { // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: } @@ -75,7 +71,7 @@ fn Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/function/call/params_one_comma.carbon b/toolchain/check/testdata/function/call/params_one_comma.carbon index c376f1bc65b3..688f10f5e0b7 100644 --- a/toolchain/check/testdata/function/call/params_one_comma.carbon +++ b/toolchain/check/testdata/function/call/params_one_comma.carbon @@ -19,20 +19,18 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } @@ -40,7 +38,7 @@ fn Main() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -58,9 +56,7 @@ fn Main() { // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: } @@ -76,7 +72,7 @@ fn Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Foo.ref.loc14: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %int_1.loc14: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc14: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14: = bound_method %int_1.loc14, %impl.elem0.loc14 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc14: = specific_function %Convert.bound.loc14, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %Convert.specific_fn.loc14(%int_1.loc14) [template = constants.%int_1.2] @@ -85,7 +81,7 @@ fn Main() { // CHECK:STDOUT: %Foo.call.loc14: init %empty_tuple.type = call %Foo.ref.loc14(%.loc14_7.2) // CHECK:STDOUT: %Foo.ref.loc15: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc15: = bound_method %int_1.loc15, %impl.elem0.loc15 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc15: = specific_function %Convert.bound.loc15, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %Convert.specific_fn.loc15(%int_1.loc15) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/function/call/params_two.carbon b/toolchain/check/testdata/function/call/params_two.carbon index 75ba6109eb9c..5f0c2b2ed196 100644 --- a/toolchain/check/testdata/function/call/params_two.carbon +++ b/toolchain/check/testdata/function/call/params_two.carbon @@ -18,10 +18,8 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] @@ -29,13 +27,13 @@ fn Main() { // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } @@ -43,7 +41,7 @@ fn Main() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -63,13 +61,9 @@ fn Main() { // CHECK:STDOUT: %b.param_patt: %i32 = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // 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_11.1: type = value_of_initializer %int.make_type_signed.loc11_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed.loc11_11, %.loc11_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_19: init type = call constants.%Int(%int_32.loc11_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_signed.loc11_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_signed.loc11_19, %.loc11_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -88,13 +82,13 @@ fn Main() { // CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc14_7: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14_7: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_7: = bound_method %int_1, %impl.elem0.loc14_7 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc14_7: = specific_function %Convert.bound.loc14_7, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc14_7: init %i32 = call %Convert.specific_fn.loc14_7(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc14_7.1: %i32 = value_of_initializer %int.convert_checked.loc14_7 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc14_7.2: %i32 = converted %int_1, %.loc14_7.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc14_10: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14_10: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_10: = bound_method %int_2, %impl.elem0.loc14_10 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc14_10: = specific_function %Convert.bound.loc14_10, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc14_10: init %i32 = call %Convert.specific_fn.loc14_10(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/function/call/params_two_comma.carbon b/toolchain/check/testdata/function/call/params_two_comma.carbon index 127ceea12377..0f5fa8a49465 100644 --- a/toolchain/check/testdata/function/call/params_two_comma.carbon +++ b/toolchain/check/testdata/function/call/params_two_comma.carbon @@ -19,10 +19,8 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] @@ -30,13 +28,13 @@ fn Main() { // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } @@ -44,7 +42,7 @@ fn Main() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -64,13 +62,9 @@ fn Main() { // CHECK:STDOUT: %b.param_patt: %i32 = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // 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_11.1: type = value_of_initializer %int.make_type_signed.loc11_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed.loc11_11, %.loc11_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_19: init type = call constants.%Int(%int_32.loc11_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_signed.loc11_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_signed.loc11_19, %.loc11_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -89,13 +83,13 @@ fn Main() { // CHECK:STDOUT: %Foo.ref.loc14: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %int_1.loc14: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc14: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc14_7: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14_7: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_7: = bound_method %int_1.loc14, %impl.elem0.loc14_7 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc14_7: = specific_function %Convert.bound.loc14_7, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc14_7: init %i32 = call %Convert.specific_fn.loc14_7(%int_1.loc14) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc14_7.1: %i32 = value_of_initializer %int.convert_checked.loc14_7 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc14_7.2: %i32 = converted %int_1.loc14, %.loc14_7.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc14_10: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14_10: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_10: = bound_method %int_2.loc14, %impl.elem0.loc14_10 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc14_10: = specific_function %Convert.bound.loc14_10, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc14_10: init %i32 = call %Convert.specific_fn.loc14_10(%int_2.loc14) [template = constants.%int_2.2] @@ -105,13 +99,13 @@ fn Main() { // CHECK:STDOUT: %Foo.ref.loc15: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc15: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc15_7: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc15_7: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc15_7: = bound_method %int_1.loc15, %impl.elem0.loc15_7 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc15_7: = specific_function %Convert.bound.loc15_7, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc15_7: init %i32 = call %Convert.specific_fn.loc15_7(%int_1.loc15) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc15_7.1: %i32 = value_of_initializer %int.convert_checked.loc15_7 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc15_7.2: %i32 = converted %int_1.loc15, %.loc15_7.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc15_10: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc15_10: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc15_10: = bound_method %int_2.loc15, %impl.elem0.loc15_10 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc15_10: = specific_function %Convert.bound.loc15_10, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc15_10: init %i32 = call %Convert.specific_fn.loc15_10(%int_2.loc15) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon b/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon index c686caf50b0c..1dd935b8a51f 100644 --- a/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon +++ b/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon @@ -34,21 +34,19 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: %Inner.1: type = class_type @Inner [template] // CHECK:STDOUT: %Inner.2: type = class_type @Inner, @Inner(%F.1) [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F, @Inner(%F.1) [symbolic] // CHECK:STDOUT: %F.2: %F.type = struct_value () [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G, @Inner(%F.1) [symbolic] // CHECK:STDOUT: %G: %G.type = struct_value () [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %F.specific_fn: = specific_function %F.2, @F(%F.1) [symbolic] @@ -57,7 +55,7 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -83,9 +81,7 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: %F.param: type = value_param runtime_param // CHECK:STDOUT: %F.loc13_10: type = bind_symbolic_name F, 0, %F.param [symbolic = constants.%F.1] // 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_33.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_33.2: type = converted %int.make_type_signed.loc13, %.loc13_33.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param.loc13: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return.loc13: ref %i32 = return_slot %return.param.loc13 // CHECK:STDOUT: } @@ -99,7 +95,7 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %Inner.decl: type = class_decl @Inner [template = constants.%Inner.1] {} {} -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class @@ -122,9 +118,7 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc8_15.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_15.2: type = converted %int.make_type_signed, %.loc8_15.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -133,13 +127,11 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%int_32.loc9) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_15.1: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_15.2: type = converted %int.make_type_signed.loc9, %.loc9_15.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param.loc9: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return.loc9: ref %i32 = return_slot %return.param.loc9 // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Inner.2 @@ -155,7 +147,7 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: fn() -> %i32 { // CHECK:STDOUT: !entry: // 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: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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] diff --git a/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon b/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon index 5232e66673b2..66ef9c451f9e 100644 --- a/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon +++ b/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon @@ -17,16 +17,14 @@ fn F(n: i32, a: [i32; n]*); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -45,14 +43,10 @@ fn F(n: i32, a: [i32; n]*); // CHECK:STDOUT: %a.param_patt: = value_param_pattern %a.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc14_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_9: init type = call constants.%Int(%int_32.loc14_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_9.1: type = value_of_initializer %int.make_type_signed.loc14_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_9.2: type = converted %int.make_type_signed.loc14_9, %.loc14_9.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc14_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_18: init type = call constants.%Int(%int_32.loc14_18) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n -// CHECK:STDOUT: %.loc14_18.1: type = value_of_initializer %int.make_type_signed.loc14_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_18.2: type = converted %int.make_type_signed.loc14_18, %.loc14_18.1 [template = constants.%i32] // CHECK:STDOUT: %ptr: type = ptr_type [template = ] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param diff --git a/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon b/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon index 87078bbe8cb1..cf6745263b40 100644 --- a/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon +++ b/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon @@ -20,16 +20,14 @@ fn F(n: i32, n: i32); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -48,13 +46,9 @@ fn F(n: i32, n: i32); // CHECK:STDOUT: %n.param_patt.loc17_15: %i32 = value_param_pattern %n.patt.loc17_14, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc17_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc17_9: init type = call constants.%Int(%int_32.loc17_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_9.1: type = value_of_initializer %int.make_type_signed.loc17_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_9.2: type = converted %int.make_type_signed.loc17_9, %.loc17_9.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc17_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc17_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc17_17: init type = call constants.%Int(%int_32.loc17_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_17.1: type = value_of_initializer %int.make_type_signed.loc17_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_17.2: type = converted %int.make_type_signed.loc17_17, %.loc17_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc17_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param.loc17_7: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n.loc17_6: %i32 = bind_name n, %n.param.loc17_7 // CHECK:STDOUT: %n.param.loc17_15: %i32 = value_param runtime_param1 diff --git a/toolchain/check/testdata/function/declaration/import.carbon b/toolchain/check/testdata/function/declaration/import.carbon index 2f39bd04b4b7..9791eb8c8d7a 100644 --- a/toolchain/check/testdata/function/declaration/import.carbon +++ b/toolchain/check/testdata/function/declaration/import.carbon @@ -261,9 +261,7 @@ import library "extern_api"; // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] @@ -279,7 +277,7 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -303,13 +301,9 @@ import library "extern_api"; // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc5_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_9: init type = call constants.%Int(%int_32.loc5_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_9.1: type = value_of_initializer %int.make_type_signed.loc5_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_9.2: type = converted %int.make_type_signed.loc5_9, %.loc5_9.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_17: init type = call constants.%Int(%int_32.loc5_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_17.1: type = value_of_initializer %int.make_type_signed.loc5_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_17.2: type = converted %int.make_type_signed.loc5_17, %.loc5_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -322,15 +316,11 @@ import library "extern_api"; // CHECK:STDOUT: %return.param_patt: %struct_type.c = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc6_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_10: init type = call constants.%Int(%int_32.loc6_10) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc6_10) -// CHECK:STDOUT: %.loc6_14.2: type = value_of_initializer %int.make_type_signed.loc6_10 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.3: type = converted %int.make_type_signed.loc6_10, %.loc6_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.4: type = converted %.loc6_14.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc6_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_14.1: %tuple.type.1 = tuple_literal (%i32.loc6_10) +// CHECK:STDOUT: %.loc6_14.2: type = converted %.loc6_14.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %int_32.loc6_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_25: init type = call constants.%Int(%int_32.loc6_25) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_25.1: type = value_of_initializer %int.make_type_signed.loc6_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_25.2: type = converted %int.make_type_signed.loc6_25, %.loc6_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] // CHECK:STDOUT: %c.param: %tuple.type.2 = value_param runtime_param0 // CHECK:STDOUT: %c: %tuple.type.2 = bind_name c, %c.param @@ -360,9 +350,7 @@ import library "extern_api"; // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] @@ -378,7 +366,7 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -402,13 +390,9 @@ import library "extern_api"; // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc5_44: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_44: init type = call constants.%Int(%int_32.loc5_44) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_44.1: type = value_of_initializer %int.make_type_signed.loc5_44 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_44.2: type = converted %int.make_type_signed.loc5_44, %.loc5_44.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_44: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_52: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_52: init type = call constants.%Int(%int_32.loc5_52) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_52.1: type = value_of_initializer %int.make_type_signed.loc5_52 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_52.2: type = converted %int.make_type_signed.loc5_52, %.loc5_52.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_52: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -421,15 +405,11 @@ import library "extern_api"; // CHECK:STDOUT: %return.param_patt: %struct_type.c = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc6_45: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_45: init type = call constants.%Int(%int_32.loc6_45) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_49.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc6_45) -// CHECK:STDOUT: %.loc6_49.2: type = value_of_initializer %int.make_type_signed.loc6_45 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_49.3: type = converted %int.make_type_signed.loc6_45, %.loc6_49.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_49.4: type = converted %.loc6_49.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc6_45: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_49.1: %tuple.type.1 = tuple_literal (%i32.loc6_45) +// CHECK:STDOUT: %.loc6_49.2: type = converted %.loc6_49.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %int_32.loc6_60: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_60: init type = call constants.%Int(%int_32.loc6_60) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_60.1: type = value_of_initializer %int.make_type_signed.loc6_60 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_60.2: type = converted %int.make_type_signed.loc6_60, %.loc6_60.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6_60: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] // CHECK:STDOUT: %c.param: %tuple.type.2 = value_param runtime_param0 // CHECK:STDOUT: %c: %tuple.type.2 = bind_name c, %c.param @@ -460,17 +440,15 @@ import library "extern_api"; // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template] @@ -497,7 +475,7 @@ import library "extern_api"; // CHECK:STDOUT: %import_ref.6: %E.type = import_ref Main//api, E, loaded [template = constants.%E] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.7 -// CHECK:STDOUT: .ImplicitAs = %import_ref.8 +// CHECK:STDOUT: .ImplicitAs = %import_ref.11 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -524,15 +502,11 @@ import library "extern_api"; // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var // CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_signed.loc7, %.loc7_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_32.loc8) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_13.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_13.2: type = converted %int.make_type_signed.loc8, %.loc8_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc8: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] // CHECK:STDOUT: %c.var: ref %struct_type.c = var c // CHECK:STDOUT: %c: ref %struct_type.c = bind_name c, %c.var @@ -563,7 +537,7 @@ import library "extern_api"; // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, imports.%import_ref.2 [template = constants.%B] // CHECK:STDOUT: %int_1.loc7: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc7: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc7: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc7: = bound_method %int_1.loc7, %impl.elem0.loc7 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc7: = specific_function %Convert.bound.loc7, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc7: init %i32 = call %Convert.specific_fn.loc7(%int_1.loc7) [template = constants.%int_1.2] @@ -574,7 +548,7 @@ import library "extern_api"; // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C] // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc8_25.1: %tuple.type.2 = tuple_literal (%int_1.loc8) -// CHECK:STDOUT: %impl.elem0.loc8: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc8: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc8: = bound_method %int_1.loc8, %impl.elem0.loc8 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc8: = specific_function %Convert.bound.loc8, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %Convert.specific_fn.loc8(%int_1.loc8) [template = constants.%int_1.2] @@ -601,9 +575,7 @@ import library "extern_api"; // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] @@ -617,10 +589,10 @@ import library "extern_api"; // CHECK:STDOUT: %E: %E.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] @@ -634,7 +606,7 @@ import library "extern_api"; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.7 -// CHECK:STDOUT: .ImplicitAs = %import_ref.8 +// CHECK:STDOUT: .ImplicitAs = %import_ref.11 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -659,13 +631,9 @@ import library "extern_api"; // CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} {} // CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] {} { // CHECK:STDOUT: %int_32.loc23_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc23_16: init type = call constants.%Int(%int_32.loc23_16) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_16.1: type = value_of_initializer %int.make_type_signed.loc23_16 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_16.2: type = converted %int.make_type_signed.loc23_16, %.loc23_16.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc23_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc23_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc23_24: init type = call constants.%Int(%int_32.loc23_24) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_24.1: type = value_of_initializer %int.make_type_signed.loc23_24 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_24.2: type = converted %int.make_type_signed.loc23_24, %.loc23_24.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc23_24: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -673,15 +641,11 @@ import library "extern_api"; // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {} { // CHECK:STDOUT: %int_32.loc32_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc32_17: init type = call constants.%Int(%int_32.loc32_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc32_21.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc32_17) -// CHECK:STDOUT: %.loc32_21.2: type = value_of_initializer %int.make_type_signed.loc32_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc32_21.3: type = converted %int.make_type_signed.loc32_17, %.loc32_21.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc32_21.4: type = converted %.loc32_21.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc32_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc32_21.1: %tuple.type.1 = tuple_literal (%i32.loc32_17) +// CHECK:STDOUT: %.loc32_21.2: type = converted %.loc32_21.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %int_32.loc32_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc32_32: init type = call constants.%Int(%int_32.loc32_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc32_32.1: type = value_of_initializer %int.make_type_signed.loc32_32 [template = constants.%i32] -// CHECK:STDOUT: %.loc32_32.2: type = converted %int.make_type_signed.loc32_32, %.loc32_32.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc32_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] // CHECK:STDOUT: %c.param: %tuple.type.2 = value_param runtime_param0 // CHECK:STDOUT: %c: %tuple.type.2 = bind_name c, %c.param @@ -695,15 +659,11 @@ import library "extern_api"; // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var // CHECK:STDOUT: %int_32.loc53: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc53: init type = call constants.%Int(%int_32.loc53) [template = constants.%i32] -// CHECK:STDOUT: %.loc53_8.1: type = value_of_initializer %int.make_type_signed.loc53 [template = constants.%i32] -// CHECK:STDOUT: %.loc53_8.2: type = converted %int.make_type_signed.loc53, %.loc53_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc53: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: %int_32.loc54: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc54: init type = call constants.%Int(%int_32.loc54) [template = constants.%i32] -// CHECK:STDOUT: %.loc54_13.1: type = value_of_initializer %int.make_type_signed.loc54 [template = constants.%i32] -// CHECK:STDOUT: %.loc54_13.2: type = converted %int.make_type_signed.loc54, %.loc54_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc54: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] // CHECK:STDOUT: %c.var: ref %struct_type.c = var c // CHECK:STDOUT: %c: ref %struct_type.c = bind_name c, %c.var @@ -734,7 +694,7 @@ import library "extern_api"; // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %int_1.loc53: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc53: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc53: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc53: = bound_method %int_1.loc53, %impl.elem0.loc53 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc53: = specific_function %Convert.bound.loc53, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc53: init %i32 = call %Convert.specific_fn.loc53(%int_1.loc53) [template = constants.%int_1.2] @@ -745,7 +705,7 @@ import library "extern_api"; // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %int_1.loc54: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc54_25.1: %tuple.type.3 = tuple_literal (%int_1.loc54) -// CHECK:STDOUT: %impl.elem0.loc54: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc54: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc54: = bound_method %int_1.loc54, %impl.elem0.loc54 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc54: = specific_function %Convert.bound.loc54, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc54: init %i32 = call %Convert.specific_fn.loc54(%int_1.loc54) [template = constants.%int_1.2] @@ -772,9 +732,7 @@ import library "extern_api"; // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %A: %A.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] @@ -788,10 +746,10 @@ import library "extern_api"; // CHECK:STDOUT: %E: %E.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] @@ -805,7 +763,7 @@ import library "extern_api"; // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.7 -// CHECK:STDOUT: .ImplicitAs = %import_ref.8 +// CHECK:STDOUT: .ImplicitAs = %import_ref.11 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -830,13 +788,9 @@ import library "extern_api"; // CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} {} // CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] {} { // CHECK:STDOUT: %int_32.loc7_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_16: init type = call constants.%Int(%int_32.loc7_16) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_16.1: type = value_of_initializer %int.make_type_signed.loc7_16 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_16.2: type = converted %int.make_type_signed.loc7_16, %.loc7_16.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_24: init type = call constants.%Int(%int_32.loc7_24) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_24.1: type = value_of_initializer %int.make_type_signed.loc7_24 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_24.2: type = converted %int.make_type_signed.loc7_24, %.loc7_24.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_24: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -844,15 +798,11 @@ import library "extern_api"; // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {} { // CHECK:STDOUT: %int_32.loc8_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc8_17: init type = call constants.%Int(%int_32.loc8_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_21.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc8_17) -// CHECK:STDOUT: %.loc8_21.2: type = value_of_initializer %int.make_type_signed.loc8_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_21.3: type = converted %int.make_type_signed.loc8_17, %.loc8_21.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_21.4: type = converted %.loc8_21.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc8_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_21.1: %tuple.type.1 = tuple_literal (%i32.loc8_17) +// CHECK:STDOUT: %.loc8_21.2: type = converted %.loc8_21.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %int_32.loc8_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc8_32: init type = call constants.%Int(%int_32.loc8_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_32.1: type = value_of_initializer %int.make_type_signed.loc8_32 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_32.2: type = converted %int.make_type_signed.loc8_32, %.loc8_32.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc8_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] // CHECK:STDOUT: %c.param: %tuple.type.2 = value_param runtime_param0 // CHECK:STDOUT: %c: %tuple.type.2 = bind_name c, %c.param @@ -866,15 +816,11 @@ import library "extern_api"; // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var // 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_8.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8.2: type = converted %int.make_type_signed.loc13, %.loc13_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%int_32.loc14) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_signed.loc14, %.loc14_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] // CHECK:STDOUT: %c.var: ref %struct_type.c = var c // CHECK:STDOUT: %c: ref %struct_type.c = bind_name c, %c.var @@ -905,7 +851,7 @@ import library "extern_api"; // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13: = bound_method %int_1.loc13, %impl.elem0.loc13 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc13: = specific_function %Convert.bound.loc13, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %Convert.specific_fn.loc13(%int_1.loc13) [template = constants.%int_1.2] @@ -916,7 +862,7 @@ import library "extern_api"; // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %int_1.loc14: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc14_25.1: %tuple.type.3 = tuple_literal (%int_1.loc14) -// CHECK:STDOUT: %impl.elem0.loc14: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14: = bound_method %int_1.loc14, %impl.elem0.loc14 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc14: = specific_function %Convert.bound.loc14, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %Convert.specific_fn.loc14(%int_1.loc14) [template = constants.%int_1.2] @@ -943,17 +889,15 @@ import library "extern_api"; // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template] @@ -980,7 +924,7 @@ import library "extern_api"; // CHECK:STDOUT: %import_ref.6: %E.type = import_ref Main//api, E, loaded [template = constants.%E] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.12 -// CHECK:STDOUT: .ImplicitAs = %import_ref.13 +// CHECK:STDOUT: .ImplicitAs = %import_ref.16 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -1007,15 +951,11 @@ import library "extern_api"; // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var // CHECK:STDOUT: %int_32.loc53: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc53: init type = call constants.%Int(%int_32.loc53) [template = constants.%i32] -// CHECK:STDOUT: %.loc53_8.1: type = value_of_initializer %int.make_type_signed.loc53 [template = constants.%i32] -// CHECK:STDOUT: %.loc53_8.2: type = converted %int.make_type_signed.loc53, %.loc53_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc53: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: %int_32.loc54: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc54: init type = call constants.%Int(%int_32.loc54) [template = constants.%i32] -// CHECK:STDOUT: %.loc54_13.1: type = value_of_initializer %int.make_type_signed.loc54 [template = constants.%i32] -// CHECK:STDOUT: %.loc54_13.2: type = converted %int.make_type_signed.loc54, %.loc54_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc54: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] // CHECK:STDOUT: %c.var: ref %struct_type.c = var c // CHECK:STDOUT: %c: ref %struct_type.c = bind_name c, %c.var @@ -1046,7 +986,7 @@ import library "extern_api"; // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, imports.%import_ref.2 [template = constants.%B] // CHECK:STDOUT: %int_1.loc53: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc53: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc53: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc53: = bound_method %int_1.loc53, %impl.elem0.loc53 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc53: = specific_function %Convert.bound.loc53, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc53: init %i32 = call %Convert.specific_fn.loc53(%int_1.loc53) [template = constants.%int_1.2] @@ -1057,7 +997,7 @@ import library "extern_api"; // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C] // CHECK:STDOUT: %int_1.loc54: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc54_25.1: %tuple.type.2 = tuple_literal (%int_1.loc54) -// CHECK:STDOUT: %impl.elem0.loc54: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc54: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc54: = bound_method %int_1.loc54, %impl.elem0.loc54 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc54: = specific_function %Convert.bound.loc54, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc54: init %i32 = call %Convert.specific_fn.loc54(%int_1.loc54) [template = constants.%int_1.2] @@ -1084,17 +1024,15 @@ import library "extern_api"; // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template] @@ -1121,7 +1059,7 @@ import library "extern_api"; // CHECK:STDOUT: %import_ref.6: %E.type = import_ref Main//extern_api, E, loaded [template = constants.%E] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.12 -// CHECK:STDOUT: .ImplicitAs = %import_ref.13 +// CHECK:STDOUT: .ImplicitAs = %import_ref.16 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -1148,15 +1086,11 @@ import library "extern_api"; // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var // CHECK:STDOUT: %int_32.loc52: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc52: init type = call constants.%Int(%int_32.loc52) [template = constants.%i32] -// CHECK:STDOUT: %.loc52_8.1: type = value_of_initializer %int.make_type_signed.loc52 [template = constants.%i32] -// CHECK:STDOUT: %.loc52_8.2: type = converted %int.make_type_signed.loc52, %.loc52_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc52: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: %int_32.loc53: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc53: init type = call constants.%Int(%int_32.loc53) [template = constants.%i32] -// CHECK:STDOUT: %.loc53_13.1: type = value_of_initializer %int.make_type_signed.loc53 [template = constants.%i32] -// CHECK:STDOUT: %.loc53_13.2: type = converted %int.make_type_signed.loc53, %.loc53_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc53: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] // CHECK:STDOUT: %c.var: ref %struct_type.c = var c // CHECK:STDOUT: %c: ref %struct_type.c = bind_name c, %c.var @@ -1187,7 +1121,7 @@ import library "extern_api"; // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, imports.%import_ref.2 [template = constants.%B] // CHECK:STDOUT: %int_1.loc52: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc52: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc52: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc52: = bound_method %int_1.loc52, %impl.elem0.loc52 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc52: = specific_function %Convert.bound.loc52, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc52: init %i32 = call %Convert.specific_fn.loc52(%int_1.loc52) [template = constants.%int_1.2] @@ -1198,7 +1132,7 @@ import library "extern_api"; // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C] // CHECK:STDOUT: %int_1.loc53: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc53_25.1: %tuple.type.2 = tuple_literal (%int_1.loc53) -// CHECK:STDOUT: %impl.elem0.loc53: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc53: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc53: = bound_method %int_1.loc53, %impl.elem0.loc53 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc53: = specific_function %Convert.bound.loc53, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc53: init %i32 = call %Convert.specific_fn.loc53(%int_1.loc53) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/function/declaration/param_same_name.carbon b/toolchain/check/testdata/function/declaration/param_same_name.carbon index c1fafa83e0b6..af2abab9c144 100644 --- a/toolchain/check/testdata/function/declaration/param_same_name.carbon +++ b/toolchain/check/testdata/function/declaration/param_same_name.carbon @@ -16,9 +16,7 @@ fn G(a: i32); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] @@ -27,7 +25,7 @@ fn G(a: i32); // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -45,9 +43,7 @@ fn G(a: i32); // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // 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_9.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed, %.loc11_9.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: } @@ -56,9 +52,7 @@ fn G(a: i32); // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // 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_9.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_9.2: type = converted %int.make_type_signed, %.loc13_9.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/definition/import.carbon b/toolchain/check/testdata/function/definition/import.carbon index 347669245861..5350eb2e06a0 100644 --- a/toolchain/check/testdata/function/definition/import.carbon +++ b/toolchain/check/testdata/function/definition/import.carbon @@ -115,9 +115,7 @@ fn D() {} // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] @@ -132,7 +130,7 @@ fn D() {} // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -155,13 +153,9 @@ fn D() {} // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc5_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_9: init type = call constants.%Int(%int_32.loc5_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_9.1: type = value_of_initializer %int.make_type_signed.loc5_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_9.2: type = converted %int.make_type_signed.loc5_9, %.loc5_9.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_17: init type = call constants.%Int(%int_32.loc5_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_17.1: type = value_of_initializer %int.make_type_signed.loc5_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_17.2: type = converted %int.make_type_signed.loc5_17, %.loc5_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -174,15 +168,11 @@ fn D() {} // CHECK:STDOUT: %return.param_patt: %struct_type.c = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc6_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_10: init type = call constants.%Int(%int_32.loc6_10) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc6_10) -// CHECK:STDOUT: %.loc6_14.2: type = value_of_initializer %int.make_type_signed.loc6_10 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.3: type = converted %int.make_type_signed.loc6_10, %.loc6_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.4: type = converted %.loc6_14.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc6_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_14.1: %tuple.type.1 = tuple_literal (%i32.loc6_10) +// CHECK:STDOUT: %.loc6_14.2: type = converted %.loc6_14.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %int_32.loc6_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_25: init type = call constants.%Int(%int_32.loc6_25) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_25.1: type = value_of_initializer %int.make_type_signed.loc6_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_25.2: type = converted %int.make_type_signed.loc6_25, %.loc6_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] // CHECK:STDOUT: %c.param: %tuple.type.2 = value_param runtime_param0 // CHECK:STDOUT: %c: %tuple.type.2 = bind_name c, %c.param @@ -248,17 +238,15 @@ fn D() {} // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template] @@ -276,7 +264,7 @@ fn D() {} // CHECK:STDOUT: %import_ref.4 = import_ref Main//fns, D, unloaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.5 -// CHECK:STDOUT: .ImplicitAs = %import_ref.6 +// CHECK:STDOUT: .ImplicitAs = %import_ref.9 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -300,15 +288,11 @@ fn D() {} // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var // CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_signed.loc7, %.loc7_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_32.loc8) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_13.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_13.2: type = converted %int.make_type_signed.loc8, %.loc8_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc8: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] // CHECK:STDOUT: %c.var: ref %struct_type.c = var c // CHECK:STDOUT: %c: ref %struct_type.c = bind_name c, %c.var @@ -327,7 +311,7 @@ fn D() {} // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, imports.%import_ref.2 [template = constants.%B] // CHECK:STDOUT: %int_1.loc7: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc7: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc7: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc7: = bound_method %int_1.loc7, %impl.elem0.loc7 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc7: = specific_function %Convert.bound.loc7, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc7: init %i32 = call %Convert.specific_fn.loc7(%int_1.loc7) [template = constants.%int_1.2] @@ -338,7 +322,7 @@ fn D() {} // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C] // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc8_25.1: %tuple.type.2 = tuple_literal (%int_1.loc8) -// CHECK:STDOUT: %impl.elem0.loc8: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc8: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc8: = bound_method %int_1.loc8, %impl.elem0.loc8 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc8: = specific_function %Convert.bound.loc8, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %Convert.specific_fn.loc8(%int_1.loc8) [template = constants.%int_1.2] @@ -357,9 +341,7 @@ fn D() {} // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: } @@ -387,13 +369,9 @@ fn D() {} // CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} {} // CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] {} { // CHECK:STDOUT: %int_32.loc23_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc23_9: init type = call constants.%Int(%int_32.loc23_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_9.1: type = value_of_initializer %int.make_type_signed.loc23_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_9.2: type = converted %int.make_type_signed.loc23_9, %.loc23_9.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc23_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc23_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc23_17: init type = call constants.%Int(%int_32.loc23_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_17.1: type = value_of_initializer %int.make_type_signed.loc23_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_17.2: type = converted %int.make_type_signed.loc23_17, %.loc23_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc23_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 diff --git a/toolchain/check/testdata/function/definition/params_one.carbon b/toolchain/check/testdata/function/definition/params_one.carbon index a75e1f4a6a65..f2ad74d26383 100644 --- a/toolchain/check/testdata/function/definition/params_one.carbon +++ b/toolchain/check/testdata/function/definition/params_one.carbon @@ -14,16 +14,14 @@ fn Foo(a: i32) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -40,9 +38,7 @@ fn Foo(a: i32) {} // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/definition/params_one_comma.carbon b/toolchain/check/testdata/function/definition/params_one_comma.carbon index 6aec7f6a5a61..c1ba454b53ea 100644 --- a/toolchain/check/testdata/function/definition/params_one_comma.carbon +++ b/toolchain/check/testdata/function/definition/params_one_comma.carbon @@ -14,16 +14,14 @@ fn Foo(a: i32,) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -40,9 +38,7 @@ fn Foo(a: i32,) {} // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/definition/params_two.carbon b/toolchain/check/testdata/function/definition/params_two.carbon index bf7b88526fa3..932197a02f20 100644 --- a/toolchain/check/testdata/function/definition/params_two.carbon +++ b/toolchain/check/testdata/function/definition/params_two.carbon @@ -14,16 +14,14 @@ fn Foo(a: i32, b: i32) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -42,13 +40,9 @@ fn Foo(a: i32, b: i32) {} // CHECK:STDOUT: %b.param_patt: %i32 = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // 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_11.1: type = value_of_initializer %int.make_type_signed.loc11_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed.loc11_11, %.loc11_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_19: init type = call constants.%Int(%int_32.loc11_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_signed.loc11_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_signed.loc11_19, %.loc11_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 diff --git a/toolchain/check/testdata/function/definition/params_two_comma.carbon b/toolchain/check/testdata/function/definition/params_two_comma.carbon index 25fd363f98e6..1ccccf8ca6e8 100644 --- a/toolchain/check/testdata/function/definition/params_two_comma.carbon +++ b/toolchain/check/testdata/function/definition/params_two_comma.carbon @@ -14,16 +14,14 @@ fn Foo(a: i32, b: i32,) {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template] // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -42,13 +40,9 @@ fn Foo(a: i32, b: i32,) {} // CHECK:STDOUT: %b.param_patt: %i32 = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // 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_11.1: type = value_of_initializer %int.make_type_signed.loc11_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_signed.loc11_11, %.loc11_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_19: init type = call constants.%Int(%int_32.loc11_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.1: type = value_of_initializer %int.make_type_signed.loc11_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_signed.loc11_19, %.loc11_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 diff --git a/toolchain/check/testdata/function/generic/deduce.carbon b/toolchain/check/testdata/function/generic/deduce.carbon index a93133a675c4..207249f53ef0 100644 --- a/toolchain/check/testdata/function/generic/deduce.carbon +++ b/toolchain/check/testdata/function/generic/deduce.carbon @@ -201,9 +201,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %require_complete.1: = require_complete_type %ptr.1 [symbolic] // CHECK:STDOUT: %ExplicitGenericParam.specific_fn.1: = specific_function %ExplicitGenericParam, @ExplicitGenericParam(%T) [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %ptr.2: type = ptr_type %i32 [template] // CHECK:STDOUT: %CallExplicitGenericParam.type: type = fn_type @CallExplicitGenericParam [template] // CHECK:STDOUT: %CallExplicitGenericParam: %CallExplicitGenericParam.type = struct_value () [template] @@ -212,14 +210,14 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %ptr.3: type = ptr_type %struct_type.a [symbolic] // CHECK:STDOUT: %CallExplicitGenericParamWithGenericArg.type: type = fn_type @CallExplicitGenericParamWithGenericArg [template] // CHECK:STDOUT: %CallExplicitGenericParamWithGenericArg: %CallExplicitGenericParamWithGenericArg.type = struct_value () [template] -// CHECK:STDOUT: %require_complete.2: = require_complete_type %ptr.3 [symbolic] +// CHECK:STDOUT: %require_complete.3: = require_complete_type %ptr.3 [symbolic] // CHECK:STDOUT: %ExplicitGenericParam.specific_fn.3: = specific_function %ExplicitGenericParam, @ExplicitGenericParam(%struct_type.a) [symbolic] -// CHECK:STDOUT: %complete_type: = complete_type_witness %ptr.2 [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %ptr.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -251,9 +249,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %return.param_patt: %ptr.2 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_37.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_37.2: type = converted %int.make_type_signed.loc6, %.loc6_37.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr.2] // CHECK:STDOUT: %return.param: ref %ptr.2 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %ptr.2 = return_slot %return.param @@ -299,9 +295,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ExplicitGenericParam.ref: %ExplicitGenericParam.type = name_ref ExplicitGenericParam, file.%ExplicitGenericParam.decl [template = constants.%ExplicitGenericParam] // CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_34.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_34.2: type = converted %int.make_type_signed.loc7, %.loc7_34.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ExplicitGenericParam.specific_fn: = specific_function %ExplicitGenericParam.ref, @ExplicitGenericParam(constants.%i32) [template = constants.%ExplicitGenericParam.specific_fn.2] // CHECK:STDOUT: %ExplicitGenericParam.call: init %ptr.2 = call %ExplicitGenericParam.specific_fn() // CHECK:STDOUT: %.loc7_35.1: %ptr.2 = value_of_initializer %ExplicitGenericParam.call @@ -316,7 +310,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %ptr.loc10_63.2: type = ptr_type @CallExplicitGenericParamWithGenericArg.%struct_type.a.loc10_62.2 (%struct_type.a) [symbolic = %ptr.loc10_63.2 (constants.%ptr.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type @CallExplicitGenericParamWithGenericArg.%ptr.loc10_63.2 (%ptr.3) [symbolic = %require_complete (constants.%require_complete.2)] +// CHECK:STDOUT: %require_complete: = require_complete_type @CallExplicitGenericParamWithGenericArg.%ptr.loc10_63.2 (%ptr.3) [symbolic = %require_complete (constants.%require_complete.3)] // CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc11_10.2: = specific_function constants.%ExplicitGenericParam, @ExplicitGenericParam(%struct_type.a.loc10_62.2) [symbolic = %ExplicitGenericParam.specific_fn.loc11_10.2 (constants.%ExplicitGenericParam.specific_fn.3)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type) -> @CallExplicitGenericParamWithGenericArg.%ptr.loc10_63.2 (%ptr.3) { @@ -354,7 +348,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %ptr.loc4_39.2 => constants.%ptr.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%complete_type +// CHECK:STDOUT: %require_complete => constants.%complete_type.2 // CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_50.2 => constants.%ExplicitGenericParam.specific_fn.2 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -371,7 +365,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %ptr.loc4_39.2 => constants.%ptr.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%require_complete.2 +// CHECK:STDOUT: %require_complete => constants.%require_complete.3 // CHECK:STDOUT: %ExplicitGenericParam.specific_fn.loc4_50.2 => constants.%ExplicitGenericParam.specific_fn.3 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -670,20 +664,19 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %require_complete.2: = require_complete_type %T [symbolic] // CHECK:STDOUT: %ImplicitGenericParam.specific_fn.1: = specific_function %ImplicitGenericParam, @ImplicitGenericParam(%T) [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %ptr.2: type = ptr_type %i32 [template] // CHECK:STDOUT: %CallImplicitGenericParam.type: type = fn_type @CallImplicitGenericParam [template] // CHECK:STDOUT: %CallImplicitGenericParam: %CallImplicitGenericParam.type = struct_value () [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32.builtin [template] // CHECK:STDOUT: %ImplicitGenericParam.specific_fn.2: = specific_function %ImplicitGenericParam, @ImplicitGenericParam(%i32) [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %ptr.2 [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %ptr.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -721,13 +714,9 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %return.param_patt: %ptr.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc6_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_32: init type = call constants.%Int(%int_32.loc6_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_32.1: type = value_of_initializer %int.make_type_signed.loc6_32 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_32.2: type = converted %int.make_type_signed.loc6_32, %.loc6_32.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc6_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6_40: init type = call constants.%Int(%int_32.loc6_40) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_43.1: type = value_of_initializer %int.make_type_signed.loc6_40 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_43.2: type = converted %int.make_type_signed.loc6_40, %.loc6_43.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr.2] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param @@ -792,7 +781,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %ptr.loc4_45.2 => constants.%ptr.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc4_41 => constants.%complete_type.1 +// CHECK:STDOUT: %require_complete.loc4_41 => constants.%complete_type.3 // CHECK:STDOUT: %require_complete.loc4_36 => constants.%complete_type.2 // CHECK:STDOUT: %ImplicitGenericParam.specific_fn.loc4_56.2 => constants.%ImplicitGenericParam.specific_fn.2 // CHECK:STDOUT: } @@ -803,15 +792,13 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%T, %i32) [symbolic] // CHECK:STDOUT: %TupleParam.type: type = fn_type @TupleParam [template] // CHECK:STDOUT: %TupleParam: %TupleParam.type = struct_value () [template] -// CHECK:STDOUT: %require_complete.1: = require_complete_type %tuple.type.2 [symbolic] +// CHECK:STDOUT: %require_complete.2: = require_complete_type %tuple.type.2 [symbolic] // CHECK:STDOUT: %CallTupleParam.type: type = fn_type @CallTupleParam [template] // CHECK:STDOUT: %CallTupleParam: %CallTupleParam.type = struct_value () [template] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] @@ -820,20 +807,20 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %tuple.type.4: type = tuple_type (Core.IntLiteral, %i32) [template] // CHECK:STDOUT: %TupleParam.specific_fn: = specific_function %TupleParam, @TupleParam(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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %tuple: %tuple.type.4 = tuple_value (%int_1, %int_2.2) [template] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %tuple.type.4 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %tuple.type.4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -854,11 +841,9 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.1 [symbolic = %T.loc4_15.2 (constants.%T)] // 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_35.1: %tuple.type.1 = tuple_literal (%T.ref, %int.make_type_signed) -// CHECK:STDOUT: %.loc4_35.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_35.3: type = converted %int.make_type_signed, %.loc4_35.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_35.4: type = converted %.loc4_35.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_35.1: %tuple.type.1 = tuple_literal (%T.ref, %i32) +// CHECK:STDOUT: %.loc4_35.2: type = converted %.loc4_35.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_15.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_15.2 (constants.%T)] // CHECK:STDOUT: %x.param: @TupleParam.%tuple.type (%tuple.type.2) = value_param runtime_param0 @@ -873,7 +858,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %tuple.type: type = tuple_type (@TupleParam.%T.loc4_15.2 (%T), %i32) [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type @TupleParam.%tuple.type (%tuple.type.2) [symbolic = %require_complete (constants.%require_complete.1)] +// CHECK:STDOUT: %require_complete: = require_complete_type @TupleParam.%tuple.type (%tuple.type.2) [symbolic = %require_complete (constants.%require_complete.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @TupleParam.%tuple.type (%tuple.type.2)) { // CHECK:STDOUT: !entry: @@ -888,7 +873,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc7_19.1: %tuple.type.3 = tuple_literal (%int_1, %int_2) // CHECK:STDOUT: %TupleParam.specific_fn: = specific_function %TupleParam.ref, @TupleParam(Core.IntLiteral) [template = constants.%TupleParam.specific_fn] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_2) [template = constants.%int_2.2] @@ -912,7 +897,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %tuple.type => constants.%tuple.type.4 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%complete_type.3 +// CHECK:STDOUT: %require_complete => constants.%complete_type.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- deduce_nested_struct.carbon @@ -921,14 +906,12 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %T, .b: %i32} [symbolic] // CHECK:STDOUT: %StructParam.type: type = fn_type @StructParam [template] // CHECK:STDOUT: %StructParam: %StructParam.type = struct_value () [template] -// CHECK:STDOUT: %require_complete.1: = require_complete_type %struct_type.a.b.1 [symbolic] +// CHECK:STDOUT: %require_complete.2: = require_complete_type %struct_type.a.b.1 [symbolic] // CHECK:STDOUT: %CallStructParam.type: type = fn_type @CallStructParam [template] // CHECK:STDOUT: %CallStructParam: %CallStructParam.type = struct_value () [template] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] @@ -937,20 +920,20 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %struct_type.a.b.3: type = struct_type {.a: Core.IntLiteral, .b: %i32} [template] // CHECK:STDOUT: %StructParam.specific_fn: = specific_function %StructParam, @StructParam(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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %struct: %struct_type.a.b.3 = struct_value (%int_1, %int_2.2) [template] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.a.b.3 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.a.b.3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -971,9 +954,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_16.1 [symbolic = %T.loc4_16.2 (constants.%T)] // 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_41.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_41.2: type = converted %int.make_type_signed, %.loc4_41.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a.b.loc4_44.1: type = struct_type {.a: %T, .b: %i32} [symbolic = %struct_type.a.b.loc4_44.2 (constants.%struct_type.a.b.1)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_16.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_16.2 (constants.%T)] @@ -989,7 +970,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %struct_type.a.b.loc4_44.2: type = struct_type {.a: @StructParam.%T.loc4_16.2 (%T), .b: %i32} [symbolic = %struct_type.a.b.loc4_44.2 (constants.%struct_type.a.b.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type @StructParam.%struct_type.a.b.loc4_44.2 (%struct_type.a.b.1) [symbolic = %require_complete (constants.%require_complete.1)] +// CHECK:STDOUT: %require_complete: = require_complete_type @StructParam.%struct_type.a.b.loc4_44.2 (%struct_type.a.b.1) [symbolic = %require_complete (constants.%require_complete.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @StructParam.%struct_type.a.b.loc4_44.2 (%struct_type.a.b.1)) { // CHECK:STDOUT: !entry: @@ -1004,7 +985,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc7_30.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) // CHECK:STDOUT: %StructParam.specific_fn: = specific_function %StructParam.ref, @StructParam(Core.IntLiteral) [template = constants.%StructParam.specific_fn] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_2) [template = constants.%int_2.2] @@ -1028,7 +1009,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %struct_type.a.b.loc4_44.2 => constants.%struct_type.a.b.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%complete_type.3 +// CHECK:STDOUT: %require_complete => constants.%complete_type.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_deduce_bigger_struct.carbon @@ -1037,13 +1018,11 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %struct_type.c.d.e: type = struct_type {.c: %T, .d: %i32, .e: %i32} [symbolic] // CHECK:STDOUT: %BigStructParam.type: type = fn_type @BigStructParam [template] // CHECK:STDOUT: %BigStructParam: %BigStructParam.type = struct_value () [template] -// CHECK:STDOUT: %require_complete: = require_complete_type %struct_type.c.d.e [symbolic] +// CHECK:STDOUT: %require_complete.2: = require_complete_type %struct_type.c.d.e [symbolic] // CHECK:STDOUT: %CallBigStructParam.type: type = fn_type @CallBigStructParam [template] // CHECK:STDOUT: %CallBigStructParam: %CallBigStructParam.type = struct_value () [template] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template] @@ -1053,7 +1032,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -1074,13 +1053,9 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_19.1 [symbolic = %T.loc4_19.2 (constants.%T)] // CHECK:STDOUT: %int_32.loc4_44: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_44: init type = call constants.%Int(%int_32.loc4_44) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_44.1: type = value_of_initializer %int.make_type_signed.loc4_44 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_44.2: type = converted %int.make_type_signed.loc4_44, %.loc4_44.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_44: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_53: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_53: init type = call constants.%Int(%int_32.loc4_53) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_53.1: type = value_of_initializer %int.make_type_signed.loc4_53 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_53.2: type = converted %int.make_type_signed.loc4_53, %.loc4_53.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_53: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.c.d.e.loc4_56.1: type = struct_type {.c: %T, .d: %i32, .e: %i32} [symbolic = %struct_type.c.d.e.loc4_56.2 (constants.%struct_type.c.d.e)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_19.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_19.2 (constants.%T)] @@ -1096,7 +1071,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %struct_type.c.d.e.loc4_56.2: type = struct_type {.c: @BigStructParam.%T.loc4_19.2 (%T), .d: %i32, .e: %i32} [symbolic = %struct_type.c.d.e.loc4_56.2 (constants.%struct_type.c.d.e)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type @BigStructParam.%struct_type.c.d.e.loc4_56.2 (%struct_type.c.d.e) [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type @BigStructParam.%struct_type.c.d.e.loc4_56.2 (%struct_type.c.d.e) [symbolic = %require_complete (constants.%require_complete.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @BigStructParam.%struct_type.c.d.e.loc4_56.2 (%struct_type.c.d.e)) { // CHECK:STDOUT: !entry: @@ -1125,13 +1100,11 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %struct_type.f.g: type = struct_type {.f: %T, .g: %i32} [symbolic] // CHECK:STDOUT: %SmallStructParam.type: type = fn_type @SmallStructParam [template] // CHECK:STDOUT: %SmallStructParam: %SmallStructParam.type = struct_value () [template] -// CHECK:STDOUT: %require_complete: = require_complete_type %struct_type.f.g [symbolic] +// CHECK:STDOUT: %require_complete.2: = require_complete_type %struct_type.f.g [symbolic] // CHECK:STDOUT: %CallSmallStructParam.type: type = fn_type @CallSmallStructParam [template] // CHECK:STDOUT: %CallSmallStructParam: %CallSmallStructParam.type = struct_value () [template] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template] @@ -1142,7 +1115,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -1163,9 +1136,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_21.1 [symbolic = %T.loc4_21.2 (constants.%T)] // 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_46.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_46.2: type = converted %int.make_type_signed, %.loc4_46.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.f.g.loc4_49.1: type = struct_type {.f: %T, .g: %i32} [symbolic = %struct_type.f.g.loc4_49.2 (constants.%struct_type.f.g)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_21.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_21.2 (constants.%T)] @@ -1181,7 +1152,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %struct_type.f.g.loc4_49.2: type = struct_type {.f: @SmallStructParam.%T.loc4_21.2 (%T), .g: %i32} [symbolic = %struct_type.f.g.loc4_49.2 (constants.%struct_type.f.g)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type @SmallStructParam.%struct_type.f.g.loc4_49.2 (%struct_type.f.g) [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type @SmallStructParam.%struct_type.f.g.loc4_49.2 (%struct_type.f.g) [symbolic = %require_complete (constants.%require_complete.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @SmallStructParam.%struct_type.f.g.loc4_49.2 (%struct_type.f.g)) { // CHECK:STDOUT: !entry: @@ -1211,13 +1182,11 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %struct_type.i.different: type = struct_type {.i: %T, .different: %i32} [symbolic] // CHECK:STDOUT: %WrongNameStructParam.type: type = fn_type @WrongNameStructParam [template] // CHECK:STDOUT: %WrongNameStructParam: %WrongNameStructParam.type = struct_value () [template] -// CHECK:STDOUT: %require_complete: = require_complete_type %struct_type.i.different [symbolic] +// CHECK:STDOUT: %require_complete.2: = require_complete_type %struct_type.i.different [symbolic] // CHECK:STDOUT: %CallWrongNameStructParam.type: type = fn_type @CallWrongNameStructParam [template] // CHECK:STDOUT: %CallWrongNameStructParam: %CallWrongNameStructParam.type = struct_value () [template] // CHECK:STDOUT: %int_8: Core.IntLiteral = int_value 8 [template] @@ -1227,7 +1196,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -1248,9 +1217,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)] // 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_58.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_58.2: type = converted %int.make_type_signed, %.loc4_58.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.i.different.loc4_61.1: type = struct_type {.i: %T, .different: %i32} [symbolic = %struct_type.i.different.loc4_61.2 (constants.%struct_type.i.different)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_25.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_25.2 (constants.%T)] @@ -1266,7 +1233,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %struct_type.i.different.loc4_61.2: type = struct_type {.i: @WrongNameStructParam.%T.loc4_25.2 (%T), .different: %i32} [symbolic = %struct_type.i.different.loc4_61.2 (constants.%struct_type.i.different)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type @WrongNameStructParam.%struct_type.i.different.loc4_61.2 (%struct_type.i.different) [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type @WrongNameStructParam.%struct_type.i.different.loc4_61.2 (%struct_type.i.different) [symbolic = %require_complete (constants.%require_complete.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @WrongNameStructParam.%struct_type.i.different.loc4_61.2 (%struct_type.i.different)) { // CHECK:STDOUT: !entry: @@ -1295,13 +1262,11 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %struct_type.first.second: type = struct_type {.first: %T, .second: %i32} [symbolic] // CHECK:STDOUT: %WrongOrderStructParam.type: type = fn_type @WrongOrderStructParam [template] // CHECK:STDOUT: %WrongOrderStructParam: %WrongOrderStructParam.type = struct_value () [template] -// CHECK:STDOUT: %require_complete: = require_complete_type %struct_type.first.second [symbolic] +// CHECK:STDOUT: %require_complete.2: = require_complete_type %struct_type.first.second [symbolic] // CHECK:STDOUT: %CallWrongOrderStructParam.type: type = fn_type @CallWrongOrderStructParam [template] // CHECK:STDOUT: %CallWrongOrderStructParam: %CallWrongOrderStructParam.type = struct_value () [template] // CHECK:STDOUT: %int_11: Core.IntLiteral = int_value 11 [template] @@ -1311,7 +1276,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -1332,9 +1297,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_26.1 [symbolic = %T.loc4_26.2 (constants.%T)] // 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_60.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_60.2: type = converted %int.make_type_signed, %.loc4_60.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.first.second.loc4_63.1: type = struct_type {.first: %T, .second: %i32} [symbolic = %struct_type.first.second.loc4_63.2 (constants.%struct_type.first.second)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_26.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_26.2 (constants.%T)] @@ -1350,7 +1313,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %struct_type.first.second.loc4_63.2: type = struct_type {.first: @WrongOrderStructParam.%T.loc4_26.2 (%T), .second: %i32} [symbolic = %struct_type.first.second.loc4_63.2 (constants.%struct_type.first.second)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type @WrongOrderStructParam.%struct_type.first.second.loc4_63.2 (%struct_type.first.second) [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type @WrongOrderStructParam.%struct_type.first.second.loc4_63.2 (%struct_type.first.second) [symbolic = %require_complete (constants.%require_complete.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: @WrongOrderStructParam.%struct_type.first.second.loc4_63.2 (%struct_type.first.second)) { // CHECK:STDOUT: !entry: diff --git a/toolchain/check/testdata/function/generic/fail_todo_param_in_type.carbon b/toolchain/check/testdata/function/generic/fail_todo_param_in_type.carbon index 1742887fb232..a3440d58d503 100644 --- a/toolchain/check/testdata/function/generic/fail_todo_param_in_type.carbon +++ b/toolchain/check/testdata/function/generic/fail_todo_param_in_type.carbon @@ -17,18 +17,16 @@ fn F(N:! i32, a: [i32; N]*); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] -// CHECK:STDOUT: %N.1: %i32 = bind_symbolic_name N, 0 [symbolic] -// CHECK:STDOUT: %N.patt.1: %i32 = symbolic_binding_pattern N, 0 [symbolic] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %N.2: %i32 = bind_symbolic_name N, 0 [symbolic] +// CHECK:STDOUT: %N.patt.2: %i32 = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.13) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %N.1, %Convert.13 [symbolic] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.4(%int_32) [symbolic] -// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %Convert.specific_fn(%N.1) [symbolic] +// CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.9) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %N.2, %Convert.9 [symbolic] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.3(%int_32) [symbolic] +// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %Convert.specific_fn(%N.2) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -36,7 +34,7 @@ fn F(N:! i32, a: [i32; N]*); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -49,48 +47,44 @@ fn F(N:! i32, a: [i32; N]*); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %N.patt.loc14_6.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc14_6.2 (constants.%N.patt.1)] -// CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc14_6.1, runtime_param [symbolic = %N.patt.loc14_6.2 (constants.%N.patt.1)] +// CHECK:STDOUT: %N.patt.loc14_6.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc14_6.2 (constants.%N.patt.2)] +// CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc14_6.1, runtime_param [symbolic = %N.patt.loc14_6.2 (constants.%N.patt.2)] // CHECK:STDOUT: %a.patt: = binding_pattern a // CHECK:STDOUT: %a.param_patt: = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc14_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_10: init type = call constants.%Int(%int_32.loc14_10) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_10.1: type = value_of_initializer %int.make_type_signed.loc14_10 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_10.2: type = converted %int.make_type_signed.loc14_10, %.loc14_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc14_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_19: init type = call constants.%Int(%int_32.loc14_19) [template = constants.%i32] -// CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc14_6.1 [symbolic = %N.loc14_6.2 (constants.%N.1)] -// CHECK:STDOUT: %.loc14_19.1: type = value_of_initializer %int.make_type_signed.loc14_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_19.2: type = converted %int.make_type_signed.loc14_19, %.loc14_19.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.13] +// CHECK:STDOUT: %i32.loc14_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc14_6.1 [symbolic = %N.loc14_6.2 (constants.%N.2)] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.9] // CHECK:STDOUT: %Convert.bound.loc14_24.1: = bound_method %N.ref, %impl.elem0 [symbolic = %Convert.bound.loc14_24.2 (constants.%Convert.bound)] -// CHECK:STDOUT: %Convert.specific_fn.loc14_24.1: = specific_function %Convert.bound.loc14_24.1, @Convert.4(constants.%int_32) [symbolic = %Convert.specific_fn.loc14_24.2 (constants.%Convert.specific_fn)] +// CHECK:STDOUT: %Convert.specific_fn.loc14_24.1: = specific_function %Convert.bound.loc14_24.1, @Convert.3(constants.%int_32) [symbolic = %Convert.specific_fn.loc14_24.2 (constants.%Convert.specific_fn)] // CHECK:STDOUT: %int.convert_checked.loc14_24.1: init Core.IntLiteral = call %Convert.specific_fn.loc14_24.1(%N.ref) [symbolic = %int.convert_checked.loc14_24.2 (constants.%int.convert_checked)] // CHECK:STDOUT: %.loc14_24.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc14_24.1 [symbolic = %int.convert_checked.loc14_24.2 (constants.%int.convert_checked)] // CHECK:STDOUT: %.loc14_24.2: Core.IntLiteral = converted %N.ref, %.loc14_24.1 [symbolic = %int.convert_checked.loc14_24.2 (constants.%int.convert_checked)] // CHECK:STDOUT: %array_type: type = array_type %.loc14_24.2, %i32 [template = ] // CHECK:STDOUT: %ptr: type = ptr_type [template = ] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param -// CHECK:STDOUT: %N.loc14_6.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc14_6.2 (constants.%N.1)] +// CHECK:STDOUT: %N.loc14_6.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc14_6.2 (constants.%N.2)] // CHECK:STDOUT: %a.param: = value_param runtime_param0 // CHECK:STDOUT: %a: = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%N.loc14_6.1: %i32) { -// CHECK:STDOUT: %N.loc14_6.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc14_6.2 (constants.%N.1)] -// CHECK:STDOUT: %N.patt.loc14_6.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc14_6.2 (constants.%N.patt.1)] -// CHECK:STDOUT: %Convert.bound.loc14_24.2: = bound_method %N.loc14_6.2, constants.%Convert.13 [symbolic = %Convert.bound.loc14_24.2 (constants.%Convert.bound)] -// CHECK:STDOUT: %Convert.specific_fn.loc14_24.2: = specific_function %Convert.bound.loc14_24.2, @Convert.4(constants.%int_32) [symbolic = %Convert.specific_fn.loc14_24.2 (constants.%Convert.specific_fn)] +// CHECK:STDOUT: %N.loc14_6.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc14_6.2 (constants.%N.2)] +// CHECK:STDOUT: %N.patt.loc14_6.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc14_6.2 (constants.%N.patt.2)] +// CHECK:STDOUT: %Convert.bound.loc14_24.2: = bound_method %N.loc14_6.2, constants.%Convert.9 [symbolic = %Convert.bound.loc14_24.2 (constants.%Convert.bound)] +// CHECK:STDOUT: %Convert.specific_fn.loc14_24.2: = specific_function %Convert.bound.loc14_24.2, @Convert.3(constants.%int_32) [symbolic = %Convert.specific_fn.loc14_24.2 (constants.%Convert.specific_fn)] // CHECK:STDOUT: %int.convert_checked.loc14_24.2: init Core.IntLiteral = call %Convert.specific_fn.loc14_24.2(%N.loc14_6.2) [symbolic = %int.convert_checked.loc14_24.2 (constants.%int.convert_checked)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%N.param_patt: %i32, %a.param_patt: ); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%N.1) { -// CHECK:STDOUT: %N.loc14_6.2 => constants.%N.1 -// CHECK:STDOUT: %N.patt.loc14_6.2 => constants.%N.1 +// CHECK:STDOUT: specific @F(constants.%N.2) { +// CHECK:STDOUT: %N.loc14_6.2 => constants.%N.2 +// CHECK:STDOUT: %N.patt.loc14_6.2 => constants.%N.2 // CHECK:STDOUT: %Convert.bound.loc14_24.2 => constants.%Convert.bound // CHECK:STDOUT: %Convert.specific_fn.loc14_24.2 => constants.%Convert.specific_fn // CHECK:STDOUT: %int.convert_checked.loc14_24.2 => constants.%int.convert_checked diff --git a/toolchain/check/testdata/function/generic/resolve_used.carbon b/toolchain/check/testdata/function/generic/resolve_used.carbon index b8ecc92ee0b7..aab5b05e7e2a 100644 --- a/toolchain/check/testdata/function/generic/resolve_used.carbon +++ b/toolchain/check/testdata/function/generic/resolve_used.carbon @@ -17,7 +17,10 @@ fn ErrorIfNIsZero(N:! Core.IntLiteral()) { // ensuring we produce an error when doing so. Notionally this error is // produced as a result of instantiating the `Core.Int` template, although // that's not how we currently model `Core.Int`. - // CHECK:STDERR: fail_todo_call_monomorphization_error.carbon:[[@LINE+3]]:10: error: integer type width of 0 is not positive [IntWidthNotPositive] + // CHECK:STDERR: fail_todo_call_monomorphization_error.carbon:[[@LINE+6]]:10: error: integer type width of 0 is not positive [IntWidthNotPositive] + // CHECK:STDERR: var v: Core.Int(N); + // CHECK:STDERR: ^~~~~~~~~~~ + // CHECK:STDERR: fail_todo_call_monomorphization_error.carbon:[[@LINE+3]]:10: note: in `i0` used here [ResolvingSpecificHere] // CHECK:STDERR: var v: Core.Int(N); // CHECK:STDERR: ^~~~~~~~~~~ var v: Core.Int(N); @@ -40,14 +43,16 @@ fn CallNegative() { // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %ErrorIfNIsZero.type: type = fn_type @ErrorIfNIsZero [template] // CHECK:STDOUT: %ErrorIfNIsZero: %ErrorIfNIsZero.type = struct_value () [template] -// CHECK:STDOUT: %Int.type: type = fn_type @Int [template] -// CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic] -// CHECK:STDOUT: %require_complete: = require_complete_type %iN [symbolic] +// CHECK:STDOUT: %Int.type: type = generic_class_type @Int [template] +// CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [template] +// CHECK:STDOUT: %Int: type = class_type @Int, @Int(%N) [symbolic] +// CHECK:STDOUT: %require_complete.2: = require_complete_type %Int [symbolic] // CHECK:STDOUT: %CallNegative.type: type = fn_type @CallNegative [template] // CHECK:STDOUT: %CallNegative: %CallNegative.type = struct_value () [template] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %ErrorIfNIsZero.specific_fn: = specific_function %ErrorIfNIsZero, @ErrorIfNIsZero(%int_0) [template] +// CHECK:STDOUT: %i0: type = class_type @Int, @Int(%int_0) [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -57,8 +62,8 @@ fn CallNegative() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %IntLiteral.type = import_ref Core//prelude/types, IntLiteral, loaded [template = constants.%IntLiteral] -// CHECK:STDOUT: %import_ref.2: %Int.type = import_ref Core//prelude/types, Int, loaded [template = constants.%Int] +// CHECK:STDOUT: %import_ref.1: %IntLiteral.type = import_ref Core//prelude/types/int_literal, IntLiteral, loaded [template = constants.%IntLiteral] +// CHECK:STDOUT: %import_ref.2: %Int.type = import_ref Core//prelude/types/int, Int, loaded [template = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -88,19 +93,17 @@ fn CallNegative() { // CHECK:STDOUT: %N.patt.loc4_19.2: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_19.2 (constants.%N.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %iN: type = int_type signed, %N.loc4_19.2 [symbolic = %iN (constants.%iN)] -// CHECK:STDOUT: %require_complete: = require_complete_type @ErrorIfNIsZero.%iN (%iN) [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %Int.loc15_20.2: type = class_type @Int, @Int(%N.loc4_19.2) [symbolic = %Int.loc15_20.2 (constants.%Int)] +// CHECK:STDOUT: %require_complete: = require_complete_type @ErrorIfNIsZero.%Int.loc15_20.2 (%Int) [symbolic = %require_complete (constants.%require_complete.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%N.param_patt: Core.IntLiteral) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Core.ref.loc12: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] +// CHECK:STDOUT: %Core.ref.loc15: = name_ref Core, imports.%Core [template = imports.%Core] +// CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int.generic] // CHECK:STDOUT: %N.ref: Core.IntLiteral = name_ref N, %N.loc4_19.1 [symbolic = %N.loc4_19.2 (constants.%N)] -// CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%N.ref) [symbolic = %iN (constants.%iN)] -// CHECK:STDOUT: %.loc12_20.1: type = value_of_initializer %int.make_type_signed [symbolic = %iN (constants.%iN)] -// CHECK:STDOUT: %.loc12_20.2: type = converted %int.make_type_signed, %.loc12_20.1 [symbolic = %iN (constants.%iN)] -// CHECK:STDOUT: %v.var: ref @ErrorIfNIsZero.%iN (%iN) = var v -// CHECK:STDOUT: %v: ref @ErrorIfNIsZero.%iN (%iN) = bind_name v, %v.var +// CHECK:STDOUT: %Int.loc15_20.1: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc15_20.2 (constants.%Int)] +// CHECK:STDOUT: %v.var: ref @ErrorIfNIsZero.%Int.loc15_20.2 (%Int) = var v +// CHECK:STDOUT: %v: ref @ErrorIfNIsZero.%Int.loc15_20.2 (%Int) = bind_name v, %v.var // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -124,7 +127,7 @@ fn CallNegative() { // CHECK:STDOUT: %N.patt.loc4_19.2 => constants.%int_0 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %iN => -// CHECK:STDOUT: %require_complete => +// CHECK:STDOUT: %Int.loc15_20.2 => constants.%i0 +// CHECK:STDOUT: %require_complete => constants.%complete_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/return_slot.carbon b/toolchain/check/testdata/function/generic/return_slot.carbon index ec26c1c08568..742caa3307c5 100644 --- a/toolchain/check/testdata/function/generic/return_slot.carbon +++ b/toolchain/check/testdata/function/generic/return_slot.carbon @@ -33,18 +33,18 @@ fn G() { // CHECK:STDOUT: %Make.1: %Make.type.1 = struct_value () [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] -// CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic] +// CHECK:STDOUT: %require_complete.1: = require_complete_type %T [symbolic] // CHECK:STDOUT: %Make.specific_fn.1: = specific_function %Make.1, @Make(%T) [symbolic] // CHECK:STDOUT: %C: type = class_type @C [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_100: Core.IntLiteral = int_value 100 [template] // CHECK:STDOUT: %array_type: type = array_type %int_100, %i32 [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %i32.builtin [template] // CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %array_type [template] // CHECK:STDOUT: %struct_type.arr.1: type = struct_type {.arr: %array_type} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.arr.1 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.arr.1 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %Wrap.2: type = class_type @Wrap, @Wrap(%i32) [template] @@ -59,13 +59,12 @@ fn G() { // CHECK:STDOUT: %Make.type.4: type = fn_type @Make, @Wrap(%C) [template] // CHECK:STDOUT: %Make.4: %Make.type.4 = struct_value () [template] // CHECK:STDOUT: %Make.specific_fn.4: = specific_function %Make.4, @Make(%C) [template] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %i32 [template] -// CHECK:STDOUT: %complete_type.4: = complete_type_witness %empty_tuple.type [template] +// CHECK:STDOUT: %complete_type.5: = complete_type_witness %empty_tuple.type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -118,17 +117,15 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: class @C { // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_100: Core.IntLiteral = int_value 100 [template = constants.%int_100] -// CHECK:STDOUT: %.loc15_21.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_21.2: type = converted %int.make_type_signed, %.loc15_21.1 [template = constants.%i32] // CHECK:STDOUT: %array_type: type = array_type %int_100, %i32 [template = constants.%array_type] -// CHECK:STDOUT: %.loc15_18: %C.elem = field_decl arr, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.arr.1 [template = constants.%complete_type.2] +// CHECK:STDOUT: %.loc15: %C.elem = field_decl arr, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.arr.1 [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: .arr = %.loc15_18 +// CHECK:STDOUT: .arr = %.loc15 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -136,7 +133,7 @@ fn G() { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type @Make.%T (%T) [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %require_complete: = require_complete_type @Make.%T (%T) [symbolic = %require_complete (constants.%require_complete.1)] // CHECK:STDOUT: %Make.type: type = fn_type @Make, @Wrap(%T) [symbolic = %Make.type (constants.%Make.type.1)] // CHECK:STDOUT: %Make: @Make.%Make.type (%Make.type.1) = struct_value () [symbolic = %Make (constants.%Make.1)] // CHECK:STDOUT: %Make.specific_fn.loc12_27.2: = specific_function %Make, @Make(%T) [symbolic = %Make.specific_fn.loc12_27.2 (constants.%Make.specific_fn.1)] @@ -156,19 +153,15 @@ fn G() { // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_32.loc18_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc18_10: init type = call constants.%Int(%int_32.loc18_10) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_10.1: type = value_of_initializer %int.make_type_signed.loc18_10 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_10.2: type = converted %int.make_type_signed.loc18_10, %.loc18_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc18_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: %Wrap.ref.loc18: %Wrap.type = name_ref Wrap, file.%Wrap.decl [template = constants.%Wrap.generic] // CHECK:STDOUT: %int_32.loc18_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc18_21: init type = call constants.%Int(%int_32.loc18_21) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_24.1: type = value_of_initializer %int.make_type_signed.loc18_21 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_24.2: type = converted %int.make_type_signed.loc18_21, %.loc18_24.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc18_21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %Wrap.loc18: type = class_type @Wrap, @Wrap(constants.%i32) [template = constants.%Wrap.2] -// CHECK:STDOUT: %.loc18_25: %Make.type.2 = specific_constant @Wrap.%Make.decl, @Wrap(constants.%i32) [template = constants.%Make.2] -// CHECK:STDOUT: %Make.ref.loc18: %Make.type.2 = name_ref Make, %.loc18_25 [template = constants.%Make.2] +// CHECK:STDOUT: %.loc18: %Make.type.2 = specific_constant @Wrap.%Make.decl, @Wrap(constants.%i32) [template = constants.%Make.2] +// CHECK:STDOUT: %Make.ref.loc18: %Make.type.2 = name_ref Make, %.loc18 [template = constants.%Make.2] // CHECK:STDOUT: %Make.specific_fn.loc18: = specific_function %Make.ref.loc18, @Make(constants.%i32) [template = constants.%Make.specific_fn.2] // CHECK:STDOUT: %Make.call.loc18: init %i32 = call %Make.specific_fn.loc18() // CHECK:STDOUT: assign %a.var, %Make.call.loc18 @@ -213,7 +206,7 @@ fn G() { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%require_complete +// CHECK:STDOUT: %require_complete => constants.%require_complete.1 // CHECK:STDOUT: %Make.type => constants.%Make.type.1 // CHECK:STDOUT: %Make => constants.%Make.1 // CHECK:STDOUT: %Make.specific_fn.loc12_27.2 => constants.%Make.specific_fn.1 @@ -265,7 +258,7 @@ fn G() { // CHECK:STDOUT: %T => constants.%empty_tuple.type // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%complete_type.4 +// CHECK:STDOUT: %require_complete => constants.%complete_type.5 // CHECK:STDOUT: %Make.type => constants.%Make.type.3 // CHECK:STDOUT: %Make => constants.%Make.3 // CHECK:STDOUT: %Make.specific_fn.loc12_27.2 => constants.%Make.specific_fn.3 @@ -284,7 +277,7 @@ fn G() { // CHECK:STDOUT: %T => constants.%C // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%complete_type.2 +// CHECK:STDOUT: %require_complete => constants.%complete_type.4 // CHECK:STDOUT: %Make.type => constants.%Make.type.4 // CHECK:STDOUT: %Make => constants.%Make.4 // CHECK:STDOUT: %Make.specific_fn.loc12_27.2 => constants.%Make.specific_fn.4 diff --git a/toolchain/check/testdata/function/generic/undefined.carbon b/toolchain/check/testdata/function/generic/undefined.carbon index 304a8bf829dc..c12f28818454 100644 --- a/toolchain/check/testdata/function/generic/undefined.carbon +++ b/toolchain/check/testdata/function/generic/undefined.carbon @@ -59,27 +59,26 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %Defined: %Defined.type = struct_value () [template] // CHECK:STDOUT: %require_complete.1: = require_complete_type %T [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %CallDefined.type: type = fn_type @CallDefined [template] // CHECK:STDOUT: %CallDefined: %CallDefined.type = struct_value () [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32.builtin [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @As(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.7, @impl.5(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.7(%int_32) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.5, @impl.3(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.5(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %Defined.specific_fn: = specific_function %Defined, @Defined(%i32) [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .As = %import_ref.2 +// CHECK:STDOUT: .As = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -114,9 +113,7 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_32.loc8) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_21.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_21.2: type = converted %int.make_type_signed.loc8, %.loc8_21.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc8: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -141,12 +138,10 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %Defined.ref: %Defined.type = name_ref Defined, file.%Defined.decl [template = constants.%Defined] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%int_32.loc9) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_23.1: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_23.2: type = converted %int.make_type_signed.loc9, %.loc9_23.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %i32.loc9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.7(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.5(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: %.loc9_20.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] // CHECK:STDOUT: %.loc9_20.2: %i32 = converted %int_0, %.loc9_20.1 [template = constants.%int_0.2] @@ -178,28 +173,27 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %Defined.type: type = fn_type @Defined [template] // CHECK:STDOUT: %Defined: %Defined.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %CallDefined.type: type = fn_type @CallDefined [template] // CHECK:STDOUT: %CallDefined: %CallDefined.type = struct_value () [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32.builtin [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @As(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.7, @impl.5(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.7(%int_32) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.5, @impl.3(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.5(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %Defined.specific_fn: = specific_function %Defined, @Defined(%i32) [template] -// CHECK:STDOUT: %require_complete.7: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32 [template] +// CHECK:STDOUT: %require_complete.5: = require_complete_type %T [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .As = %import_ref.2 +// CHECK:STDOUT: .As = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -234,9 +228,7 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_21.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_21.2: type = converted %int.make_type_signed.loc6, %.loc6_21.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -264,7 +256,7 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %T.patt.loc4: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type @Defined.%T.loc4_12.2 (%T) [symbolic = %require_complete (constants.%require_complete.7)] +// CHECK:STDOUT: %require_complete: = require_complete_type @Defined.%T.loc4_12.2 (%T) [symbolic = %require_complete (constants.%require_complete.5)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: %T) -> %T { // CHECK:STDOUT: !entry: @@ -278,12 +270,10 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %Defined.ref: %Defined.type = name_ref Defined, file.%Defined.decl.loc4 [template = constants.%Defined] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_23.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_23.2: type = converted %int.make_type_signed.loc7, %.loc7_23.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %i32.loc7: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.7(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.5(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: %.loc7_20.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] // CHECK:STDOUT: %.loc7_20.2: %i32 = converted %int_0, %.loc7_20.1 [template = constants.%int_0.2] @@ -315,18 +305,16 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %Undefined.type: type = fn_type @Undefined [template] // CHECK:STDOUT: %Undefined: %Undefined.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %CallUndefined.type: type = fn_type @CallUndefined [template] // CHECK:STDOUT: %CallUndefined: %CallUndefined.type = struct_value () [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @As(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.7, @impl.5(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.7(%int_32) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.5, @impl.3(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.5(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %Undefined.specific_fn: = specific_function %Undefined, @Undefined(%i32) [template] // CHECK:STDOUT: } @@ -334,7 +322,7 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .As = %import_ref.2 +// CHECK:STDOUT: .As = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -369,9 +357,7 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_23.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_23.2: type = converted %int.make_type_signed.loc6, %.loc6_23.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -389,12 +375,10 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %Undefined.ref: %Undefined.type = name_ref Undefined, file.%Undefined.decl [template = constants.%Undefined] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // 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_25.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_25.2: type = converted %int.make_type_signed.loc13, %.loc13_25.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.7(constants.%int_32) [template = constants.%Convert.specific_fn] +// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.5(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: %.loc13_22.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] // CHECK:STDOUT: %.loc13_22.2: %i32 = converted %int_0, %.loc13_22.1 [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/global/decl.carbon b/toolchain/check/testdata/global/decl.carbon index bf132c4ba130..369c6c3d27d0 100644 --- a/toolchain/check/testdata/global/decl.carbon +++ b/toolchain/check/testdata/global/decl.carbon @@ -13,14 +13,12 @@ var a: i32; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -33,9 +31,7 @@ var a: i32; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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: %.loc10_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8.2: type = converted %int.make_type_signed, %.loc10_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/global/simple_init.carbon b/toolchain/check/testdata/global/simple_init.carbon index 6e80bf31bdf5..93bc6830c620 100644 --- a/toolchain/check/testdata/global/simple_init.carbon +++ b/toolchain/check/testdata/global/simple_init.carbon @@ -13,15 +13,13 @@ var a: i32 = 0; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -29,7 +27,7 @@ var a: i32 = 0; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -42,9 +40,7 @@ var a: i32 = 0; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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: %.loc10_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8.2: type = converted %int.make_type_signed, %.loc10_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: } @@ -52,7 +48,7 @@ var a: i32 = 0; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // 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: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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] diff --git a/toolchain/check/testdata/global/simple_with_fun.carbon b/toolchain/check/testdata/global/simple_with_fun.carbon index 1d3c00e08bdc..68312197b44e 100644 --- a/toolchain/check/testdata/global/simple_with_fun.carbon +++ b/toolchain/check/testdata/global/simple_with_fun.carbon @@ -18,17 +18,15 @@ var a: i32 = test_a(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %test_a.type: type = fn_type @test_a [template] // CHECK:STDOUT: %test_a: %test_a.type = struct_value () [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -36,7 +34,7 @@ var a: i32 = test_a(); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -54,16 +52,12 @@ var a: i32 = test_a(); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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_16.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_16.2: type = converted %int.make_type_signed, %.loc11_16.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [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: %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: %.loc15_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_signed, %.loc15_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: } @@ -71,7 +65,7 @@ var a: i32 = test_a(); // CHECK:STDOUT: fn @test_a() -> %i32 { // CHECK:STDOUT: !entry: // 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: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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] diff --git a/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon b/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon index 469b2a595dc8..cd548bd17d3f 100644 --- a/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon +++ b/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon @@ -45,23 +45,21 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %If1.type: type = fn_type @If1 [template] // CHECK:STDOUT: %If1: %If1.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %If2.type: type = fn_type @If2 [template] // CHECK:STDOUT: %If2: %If2.type = struct_value () [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %If3.type: type = fn_type @If3 [template] @@ -72,7 +70,7 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Bool = %import_ref.1 // CHECK:STDOUT: .Int = %import_ref.2 -// CHECK:STDOUT: .ImplicitAs = %import_ref.3 +// CHECK:STDOUT: .ImplicitAs = %import_ref.6 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -96,9 +94,7 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc11_11.2: type = converted %bool.make_type, %.loc11_11.1 [template = bool] // 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_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_20.2: type = converted %int.make_type_signed, %.loc11_20.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.param: bool = value_param runtime_param0 // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -114,9 +110,7 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: %.loc22_11.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc22_11.2: type = converted %bool.make_type, %.loc22_11.1 [template = bool] // 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: %.loc22_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc22_20.2: type = converted %int.make_type_signed, %.loc22_20.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.param: bool = value_param runtime_param0 // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -132,9 +126,7 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: %.loc33_11.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc33_11.2: type = converted %bool.make_type, %.loc33_11.1 [template = bool] // 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: %.loc33_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc33_20.2: type = converted %int.make_type_signed, %.loc33_20.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.param: bool = value_param runtime_param0 // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -149,7 +141,7 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.then: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] @@ -173,7 +165,7 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.else: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2, %impl.elem0 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_2) [template = constants.%int_2.2] @@ -191,7 +183,7 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.then: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/if/fail_scope.carbon b/toolchain/check/testdata/if/fail_scope.carbon index 1c9d0ceaa6d8..47051fee04a3 100644 --- a/toolchain/check/testdata/if/fail_scope.carbon +++ b/toolchain/check/testdata/if/fail_scope.carbon @@ -25,17 +25,15 @@ fn VarScope(b: bool) -> i32 { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %VarScope.type: type = fn_type @VarScope [template] // CHECK:STDOUT: %VarScope: %VarScope.type = struct_value () [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } @@ -44,7 +42,7 @@ fn VarScope(b: bool) -> i32 { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Bool = %import_ref.1 // CHECK:STDOUT: .Int = %import_ref.2 -// CHECK:STDOUT: .ImplicitAs = %import_ref.3 +// CHECK:STDOUT: .ImplicitAs = %import_ref.6 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -66,9 +64,7 @@ fn VarScope(b: bool) -> i32 { // CHECK:STDOUT: %.loc11_16.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc11_16.2: type = converted %bool.make_type, %.loc11_16.1 [template = bool] // 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_25.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.2: type = converted %int.make_type_signed.loc11, %.loc11_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.param: bool = value_param runtime_param0 // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -83,18 +79,16 @@ fn VarScope(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.then: // 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_12.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_12.2: type = converted %int.make_type_signed.loc13, %.loc13_12.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.var: ref %i32 = var n // CHECK:STDOUT: %n: ref %i32 = bind_name n, %n.var // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_2) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc13_19: init %i32 = converted %int_2, %int.convert_checked [template = constants.%int_2.2] -// CHECK:STDOUT: assign %n.var, %.loc13_19 +// CHECK:STDOUT: %.loc13: init %i32 = converted %int_2, %int.convert_checked [template = constants.%int_2.2] +// CHECK:STDOUT: assign %n.var, %.loc13 // CHECK:STDOUT: %n.ref.loc14: ref %i32 = name_ref n, %n // CHECK:STDOUT: %.loc14: %i32 = bind_value %n.ref.loc14 // CHECK:STDOUT: return %.loc14 diff --git a/toolchain/check/testdata/if/unreachable_fallthrough.carbon b/toolchain/check/testdata/if/unreachable_fallthrough.carbon index 0a400763e9a5..ccc7ec314d76 100644 --- a/toolchain/check/testdata/if/unreachable_fallthrough.carbon +++ b/toolchain/check/testdata/if/unreachable_fallthrough.carbon @@ -23,21 +23,19 @@ fn If(b: bool) -> i32 { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %If.type: type = fn_type @If [template] // CHECK:STDOUT: %If: %If.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } @@ -46,7 +44,7 @@ fn If(b: bool) -> i32 { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Bool = %import_ref.1 // CHECK:STDOUT: .Int = %import_ref.2 -// CHECK:STDOUT: .ImplicitAs = %import_ref.3 +// CHECK:STDOUT: .ImplicitAs = %import_ref.6 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -68,9 +66,7 @@ fn If(b: bool) -> i32 { // CHECK:STDOUT: %.loc11_10.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc11_10.2: type = converted %bool.make_type, %.loc11_10.1 [template = bool] // 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_19.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_signed, %.loc11_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.param: bool = value_param runtime_param0 // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -85,7 +81,7 @@ fn If(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.then: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13: = bound_method %int_1, %impl.elem0.loc13 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc13: = specific_function %Convert.bound.loc13, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %Convert.specific_fn.loc13(%int_1) [template = constants.%int_1.2] @@ -95,7 +91,7 @@ fn If(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.else: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc15: = bound_method %int_2, %impl.elem0.loc15 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc15: = specific_function %Convert.bound.loc15, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %Convert.specific_fn.loc15(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/if_expr/basic.carbon b/toolchain/check/testdata/if_expr/basic.carbon index 9651880486a3..c7d9e86e2c3a 100644 --- a/toolchain/check/testdata/if_expr/basic.carbon +++ b/toolchain/check/testdata/if_expr/basic.carbon @@ -19,9 +19,7 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] @@ -29,10 +27,10 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_0.2) [template] @@ -42,7 +40,7 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Bool = %import_ref.1 // CHECK:STDOUT: .Int = %import_ref.2 -// CHECK:STDOUT: .ImplicitAs = %import_ref.3 +// CHECK:STDOUT: .ImplicitAs = %import_ref.6 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -68,17 +66,11 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc11_9.2: type = converted %bool.make_type, %.loc11_9.1 [template = bool] // CHECK:STDOUT: %int_32.loc11_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_18: init type = call constants.%Int(%int_32.loc11_18) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_18.1: type = value_of_initializer %int.make_type_signed.loc11_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_18.2: type = converted %int.make_type_signed.loc11_18, %.loc11_18.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_26: init type = call constants.%Int(%int_32.loc11_26) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_26.1: type = value_of_initializer %int.make_type_signed.loc11_26 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_26.2: type = converted %int.make_type_signed.loc11_26, %.loc11_26.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_34: init type = call constants.%Int(%int_32.loc11_34) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_34.1: type = value_of_initializer %int.make_type_signed.loc11_34 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_34.2: type = converted %int.make_type_signed.loc11_34, %.loc11_34.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.param: bool = value_param runtime_param0 // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param1 @@ -93,16 +85,14 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: fn @F(%b.param_patt: bool, %n.param_patt: %i32, %m.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: // 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: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] -// CHECK:STDOUT: %.loc12_11.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_11.2: type = converted %int.make_type_signed.loc12, %.loc12_11.1 [template = constants.%i32] // CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template = constants.%array_type] // CHECK:STDOUT: %x.var: ref %array_type = var x // CHECK:STDOUT: %x: ref %array_type = bind_name x, %x.var // CHECK:STDOUT: %int_0.loc12_22: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc12_24.1: %tuple.type = tuple_literal (%int_0.loc12_22) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.loc12_22, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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.loc12_22) [template = constants.%int_0.2] @@ -120,23 +110,19 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %x.ref.loc13_20: ref %array_type = name_ref x, %x // CHECK:STDOUT: %m.ref: %i32 = name_ref m, %m // CHECK:STDOUT: %int_32.loc13_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_23: init type = call constants.%Int(%int_32.loc13_23) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %int.make_type_signed.loc13_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.2: type = converted %int.make_type_signed.loc13_23, %.loc13_23.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.3: ref %i32 = array_index %x.ref.loc13_20, %m.ref -// CHECK:STDOUT: %.loc13_23.4: %i32 = bind_value %.loc13_23.3 -// CHECK:STDOUT: br !if.expr.result(%.loc13_23.4) +// CHECK:STDOUT: %i32.loc13_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_23.1: ref %i32 = array_index %x.ref.loc13_20, %m.ref +// CHECK:STDOUT: %.loc13_23.2: %i32 = bind_value %.loc13_23.1 +// CHECK:STDOUT: br !if.expr.result(%.loc13_23.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: // CHECK:STDOUT: %x.ref.loc13_30: ref %array_type = name_ref x, %x // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n // CHECK:STDOUT: %int_32.loc13_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_33: init type = call constants.%Int(%int_32.loc13_33) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_33.1: type = value_of_initializer %int.make_type_signed.loc13_33 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_33.2: type = converted %int.make_type_signed.loc13_33, %.loc13_33.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_33.3: ref %i32 = array_index %x.ref.loc13_30, %n.ref -// CHECK:STDOUT: %.loc13_33.4: %i32 = bind_value %.loc13_33.3 -// CHECK:STDOUT: br !if.expr.result(%.loc13_33.4) +// CHECK:STDOUT: %i32.loc13_33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13_33.1: ref %i32 = array_index %x.ref.loc13_30, %n.ref +// CHECK:STDOUT: %.loc13_33.2: %i32 = bind_value %.loc13_33.1 +// CHECK:STDOUT: br !if.expr.result(%.loc13_33.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result: // CHECK:STDOUT: %.loc13_10: %i32 = block_arg !if.expr.result diff --git a/toolchain/check/testdata/if_expr/constant_condition.carbon b/toolchain/check/testdata/if_expr/constant_condition.carbon index bf544fbb551e..6c642c3dfcbb 100644 --- a/toolchain/check/testdata/if_expr/constant_condition.carbon +++ b/toolchain/check/testdata/if_expr/constant_condition.carbon @@ -35,23 +35,21 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -70,7 +68,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -92,9 +90,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -103,9 +99,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc12_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_11.2: type = converted %int.make_type_signed, %.loc12_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -114,9 +108,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc14_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_11.2: type = converted %int.make_type_signed, %.loc14_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -125,9 +117,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc18_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc18_11.2: type = converted %int.make_type_signed, %.loc18_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -136,9 +126,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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_18.1: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] -// CHECK:STDOUT: %.loc22_18.2: type = converted %int.make_type_signed.loc22, %.loc22_18.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -149,9 +137,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc28: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc28: init type = call constants.%Int(%int_32.loc28) [template = constants.%i32] -// CHECK:STDOUT: %.loc28_34.1: type = value_of_initializer %int.make_type_signed.loc28 [template = constants.%i32] -// CHECK:STDOUT: %.loc28_34.2: type = converted %int.make_type_signed.loc28, %.loc28_34.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc28: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %t.param: type = value_param runtime_param0 // CHECK:STDOUT: %t: type = bind_name t, %t.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -162,7 +148,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: fn @A() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] @@ -174,7 +160,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: fn @B() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2, %impl.elem0 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_2) [template = constants.%int_2.2] @@ -238,16 +224,12 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc23: // CHECK:STDOUT: %int_32.loc23_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc23_23: init type = call constants.%Int(%int_32.loc23_23) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_23.1: type = value_of_initializer %int.make_type_signed.loc23_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_23.2: type = converted %int.make_type_signed.loc23_23, %.loc23_23.1 [template = constants.%i32] -// CHECK:STDOUT: br !if.expr.result.loc23(%.loc23_23.2) +// CHECK:STDOUT: %i32.loc23_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: br !if.expr.result.loc23(%i32.loc23_23) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc23: // CHECK:STDOUT: %int_32.loc23_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc23_32: init type = call constants.%Int(%int_32.loc23_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_35.1: type = value_of_initializer %int.make_type_signed.loc23_32 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_35.2: type = converted %int.make_type_signed.loc23_32, %.loc23_35.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc23_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ptr.loc23: type = ptr_type %i32 [template = constants.%ptr] // CHECK:STDOUT: br !if.expr.result.loc23(%ptr.loc23) // CHECK:STDOUT: @@ -256,7 +238,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %v: ref %i32 = bind_name v, %v.var // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] @@ -267,21 +249,17 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc24: // CHECK:STDOUT: %int_32.loc24_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc24_24: init type = call constants.%Int(%int_32.loc24_24) [template = constants.%i32] -// CHECK:STDOUT: %.loc24_24.1: type = value_of_initializer %int.make_type_signed.loc24_24 [template = constants.%i32] -// CHECK:STDOUT: %.loc24_24.2: type = converted %int.make_type_signed.loc24_24, %.loc24_24.1 [template = constants.%i32] -// CHECK:STDOUT: br !if.expr.result.loc24(%.loc24_24.2) +// CHECK:STDOUT: %i32.loc24_24: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: br !if.expr.result.loc24(%i32.loc24_24) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc24: // CHECK:STDOUT: %int_32.loc24_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc24_33: init type = call constants.%Int(%int_32.loc24_33) [template = constants.%i32] -// CHECK:STDOUT: %.loc24_36.1: type = value_of_initializer %int.make_type_signed.loc24_33 [template = constants.%i32] -// CHECK:STDOUT: %.loc24_36.2: type = converted %int.make_type_signed.loc24_33, %.loc24_36.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc24_33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ptr.loc24: type = ptr_type %i32 [template = constants.%ptr] // CHECK:STDOUT: br !if.expr.result.loc24(%ptr.loc24) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc24: -// CHECK:STDOUT: %.loc24_10: type = block_arg !if.expr.result.loc24 [template = constants.%ptr] +// CHECK:STDOUT: %.loc24: type = block_arg !if.expr.result.loc24 [template = constants.%ptr] // CHECK:STDOUT: %w.var: ref %ptr = var w // CHECK:STDOUT: %w: ref %ptr = bind_name w, %w.var // CHECK:STDOUT: %v.ref: ref %i32 = name_ref v, %v @@ -301,10 +279,8 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc29: // CHECK:STDOUT: %int_32.loc29: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc29: init type = call constants.%Int(%int_32.loc29) [template = constants.%i32] -// CHECK:STDOUT: %.loc29_23.1: type = value_of_initializer %int.make_type_signed.loc29 [template = constants.%i32] -// CHECK:STDOUT: %.loc29_23.2: type = converted %int.make_type_signed.loc29, %.loc29_23.1 [template = constants.%i32] -// CHECK:STDOUT: br !if.expr.result.loc29(%.loc29_23.2) +// CHECK:STDOUT: %i32.loc29: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: br !if.expr.result.loc29(%i32.loc29) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc29: // CHECK:STDOUT: %t.ref.loc29: type = name_ref t, %t @@ -315,7 +291,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %v: ref %i32 = bind_name v, %v.var // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] @@ -330,14 +306,12 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc30: // CHECK:STDOUT: %int_32.loc30: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc30: init type = call constants.%Int(%int_32.loc30) [template = constants.%i32] -// CHECK:STDOUT: %.loc30_34.1: type = value_of_initializer %int.make_type_signed.loc30 [template = constants.%i32] -// CHECK:STDOUT: %.loc30_34.2: type = converted %int.make_type_signed.loc30, %.loc30_34.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc30: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr] // CHECK:STDOUT: br !if.expr.result.loc30(%ptr) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc30: -// CHECK:STDOUT: %.loc30_10: type = block_arg !if.expr.result.loc30 [template = constants.%ptr] +// CHECK:STDOUT: %.loc30: type = block_arg !if.expr.result.loc30 [template = constants.%ptr] // CHECK:STDOUT: %w.var: ref %ptr = var w // CHECK:STDOUT: %w: ref %ptr = bind_name w, %w.var // CHECK:STDOUT: %v.ref: ref %i32 = name_ref v, %v diff --git a/toolchain/check/testdata/if_expr/control_flow.carbon b/toolchain/check/testdata/if_expr/control_flow.carbon index e7d6500bc3a3..1e4814a62902 100644 --- a/toolchain/check/testdata/if_expr/control_flow.carbon +++ b/toolchain/check/testdata/if_expr/control_flow.carbon @@ -19,23 +19,21 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] @@ -47,8 +45,8 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 -// CHECK:STDOUT: .Bool = %import_ref.38 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 +// CHECK:STDOUT: .Bool = %import_ref.193 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -67,9 +65,7 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -78,9 +74,7 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc12_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_11.2: type = converted %int.make_type_signed, %.loc12_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -94,9 +88,7 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %.loc14_9.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc14_9.2: type = converted %bool.make_type, %.loc14_9.1 [template = bool] // 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: %.loc14_18.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_18.2: type = converted %int.make_type_signed, %.loc14_18.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.param: bool = value_param runtime_param0 // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -107,7 +99,7 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: fn @A() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] @@ -119,7 +111,7 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: fn @B() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2, %impl.elem0 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/if_expr/fail_not_in_function.carbon b/toolchain/check/testdata/if_expr/fail_not_in_function.carbon index f9286638026d..8c4c3bc09c90 100644 --- a/toolchain/check/testdata/if_expr/fail_not_in_function.carbon +++ b/toolchain/check/testdata/if_expr/fail_not_in_function.carbon @@ -41,9 +41,7 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %true: bool = bool_literal true [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: } @@ -51,8 +49,8 @@ class C { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 -// CHECK:STDOUT: .Float = %import_ref.38 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 +// CHECK:STDOUT: .Float = %import_ref.193 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -61,14 +59,12 @@ class C { // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .x = .inst30.loc23_5 +// CHECK:STDOUT: .x = .inst43.loc23_5 // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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: %.loc23_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc23_8.2: type = converted %int.make_type_signed, %.loc23_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -78,8 +74,8 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: .n = .inst387.loc37_8 -// CHECK:STDOUT: complete_type_witness = .inst389.loc38_1 +// CHECK:STDOUT: .n = .inst559.loc37_8 +// CHECK:STDOUT: complete_type_witness = .inst561.loc38_1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { diff --git a/toolchain/check/testdata/if_expr/fail_partial_constant.carbon b/toolchain/check/testdata/if_expr/fail_partial_constant.carbon index a4ad6f02e458..55c7e99d6b34 100644 --- a/toolchain/check/testdata/if_expr/fail_partial_constant.carbon +++ b/toolchain/check/testdata/if_expr/fail_partial_constant.carbon @@ -47,9 +47,7 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: %ConditionIsNonConstant.type: type = fn_type @ConditionIsNonConstant [template] // CHECK:STDOUT: %ConditionIsNonConstant: %ConditionIsNonConstant.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -87,20 +85,16 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: // CHECK:STDOUT: %int_32.loc12_20: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc12_20: init type = call constants.%Int(%int_32.loc12_20) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_20.1: type = value_of_initializer %int.make_type_signed.loc12_20 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_20.2: type = converted %int.make_type_signed.loc12_20, %.loc12_20.1 [template = constants.%i32] -// CHECK:STDOUT: br !if.expr.result(%.loc12_20.2) +// CHECK:STDOUT: %i32.loc12_20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: br !if.expr.result(%i32.loc12_20) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: // 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_24.1: type = value_of_initializer %int.make_type_signed.loc12_29 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_24.2: type = converted %int.make_type_signed.loc12_29, %.loc12_24.1 [template = constants.%i32] -// CHECK:STDOUT: br !if.expr.result(%.loc12_24.2) +// CHECK:STDOUT: %i32.loc12_29: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: br !if.expr.result(%i32.loc12_29) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result: -// CHECK:STDOUT: %.loc12_10: type = block_arg !if.expr.result +// CHECK:STDOUT: %.loc12: type = block_arg !if.expr.result // CHECK:STDOUT: %v.var: ref = var v // CHECK:STDOUT: %v: ref = bind_name v, %v.var // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] @@ -115,16 +109,14 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: %ChosenBranchIsNonConstant: %ChosenBranchIsNonConstant.type = struct_value () [template] // CHECK:STDOUT: %true: bool = bool_literal true [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %false: bool = bool_literal false [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -156,13 +148,11 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc9: // CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%int_32.loc9) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_25.1: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_25.2: type = converted %int.make_type_signed.loc9, %.loc9_25.1 [template = constants.%i32] -// CHECK:STDOUT: br !if.expr.result.loc9(%.loc9_25.2) +// CHECK:STDOUT: %i32.loc9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: br !if.expr.result.loc9(%i32.loc9) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc9: -// CHECK:STDOUT: %.loc9_10: type = block_arg !if.expr.result.loc9 +// CHECK:STDOUT: %.loc9: type = block_arg !if.expr.result.loc9 // CHECK:STDOUT: %v.var: ref = var v // CHECK:STDOUT: %v: ref = bind_name v, %v.var // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [template = constants.%int_1] @@ -172,17 +162,15 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc13: // 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_24.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_24.2: type = converted %int.make_type_signed.loc13, %.loc13_24.1 [template = constants.%i32] -// CHECK:STDOUT: br !if.expr.result.loc13(%.loc13_24.2) +// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: br !if.expr.result.loc13(%i32.loc13) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc13: // CHECK:STDOUT: %t.ref.loc13: type = name_ref t, %t // CHECK:STDOUT: br !if.expr.result.loc13(%t.ref.loc13) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc13: -// CHECK:STDOUT: %.loc13_10: type = block_arg !if.expr.result.loc13 +// CHECK:STDOUT: %.loc13: type = block_arg !if.expr.result.loc13 // CHECK:STDOUT: %w.var: ref = var w // CHECK:STDOUT: %w: ref = bind_name w, %w.var // CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [template = constants.%int_1] diff --git a/toolchain/check/testdata/if_expr/nested.carbon b/toolchain/check/testdata/if_expr/nested.carbon index 025a9e8f1813..c8d5e8fe113f 100644 --- a/toolchain/check/testdata/if_expr/nested.carbon +++ b/toolchain/check/testdata/if_expr/nested.carbon @@ -18,29 +18,27 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_4.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: } @@ -49,7 +47,7 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Bool = %import_ref.1 // CHECK:STDOUT: .Int = %import_ref.2 -// CHECK:STDOUT: .ImplicitAs = %import_ref.3 +// CHECK:STDOUT: .ImplicitAs = %import_ref.6 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -81,9 +79,7 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: %.loc11_27.1: type = value_of_initializer %bool.make_type.loc11_27 [template = bool] // CHECK:STDOUT: %.loc11_27.2: type = converted %bool.make_type.loc11_27, %.loc11_27.1 [template = bool] // 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_36.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_36.2: type = converted %int.make_type_signed.loc11, %.loc11_36.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: bool = value_param runtime_param0 // CHECK:STDOUT: %a: bool = bind_name a, %a.param // CHECK:STDOUT: %b.param: bool = value_param runtime_param1 @@ -107,20 +103,18 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: !if.expr.then.loc12_20: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_32.loc12_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc12_25: init type = call constants.%Int(%int_32.loc12_25) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_25.1: type = value_of_initializer %int.make_type_signed.loc12_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_25.2: type = converted %int.make_type_signed.loc12_25, %.loc12_25.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc12_25: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %i32.loc12_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc12_25: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_25: = bound_method %int_1, %impl.elem0.loc12_25 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc12_25: = specific_function %Convert.bound.loc12_25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc12_25: init %i32 = call %Convert.specific_fn.loc12_25(%int_1) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc12_25.3: %i32 = value_of_initializer %int.convert_checked.loc12_25 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc12_25.4: %i32 = converted %int_1, %.loc12_25.3 [template = constants.%int_1.2] -// CHECK:STDOUT: br !if.expr.result.loc12_20(%.loc12_25.4) +// CHECK:STDOUT: %.loc12_25.1: %i32 = value_of_initializer %int.convert_checked.loc12_25 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc12_25.2: %i32 = converted %int_1, %.loc12_25.1 [template = constants.%int_1.2] +// CHECK:STDOUT: br !if.expr.result.loc12_20(%.loc12_25.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc12_20: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc12_32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_32: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_32: = bound_method %int_2, %impl.elem0.loc12_32 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc12_32: = specific_function %Convert.bound.loc12_32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc12_32: init %i32 = call %Convert.specific_fn.loc12_32(%int_2) [template = constants.%int_2.2] @@ -139,20 +133,18 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: !if.expr.then.loc12_44: // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %int_32.loc12_49: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc12_49: init type = call constants.%Int(%int_32.loc12_49) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_49.1: type = value_of_initializer %int.make_type_signed.loc12_49 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_49.2: type = converted %int.make_type_signed.loc12_49, %.loc12_49.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc12_49: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %i32.loc12_49: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc12_49: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_49: = bound_method %int_3, %impl.elem0.loc12_49 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc12_49: = specific_function %Convert.bound.loc12_49, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc12_49: init %i32 = call %Convert.specific_fn.loc12_49(%int_3) [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc12_49.3: %i32 = value_of_initializer %int.convert_checked.loc12_49 [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc12_49.4: %i32 = converted %int_3, %.loc12_49.3 [template = constants.%int_3.2] -// CHECK:STDOUT: br !if.expr.result.loc12_44(%.loc12_49.4) +// CHECK:STDOUT: %.loc12_49.1: %i32 = value_of_initializer %int.convert_checked.loc12_49 [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc12_49.2: %i32 = converted %int_3, %.loc12_49.1 [template = constants.%int_3.2] +// CHECK:STDOUT: br !if.expr.result.loc12_44(%.loc12_49.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc12_44: // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] -// CHECK:STDOUT: %impl.elem0.loc12_56: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_56: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_56: = bound_method %int_4, %impl.elem0.loc12_56 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc12_56: = specific_function %Convert.bound.loc12_56, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc12_56: init %i32 = call %Convert.specific_fn.loc12_56(%int_4) [template = constants.%int_4.2] diff --git a/toolchain/check/testdata/if_expr/struct.carbon b/toolchain/check/testdata/if_expr/struct.carbon index fee0c4d19a68..55583e3ee955 100644 --- a/toolchain/check/testdata/if_expr/struct.carbon +++ b/toolchain/check/testdata/if_expr/struct.carbon @@ -19,10 +19,8 @@ fn F(cond: bool) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] @@ -34,13 +32,13 @@ fn F(cond: bool) { // 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = 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] @@ -49,8 +47,8 @@ fn F(cond: bool) { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .Bool = %import_ref.2 -// CHECK:STDOUT: .ImplicitAs = %import_ref.3 +// CHECK:STDOUT: .Bool = %import_ref.5 +// CHECK:STDOUT: .ImplicitAs = %import_ref.6 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -68,13 +66,9 @@ fn F(cond: bool) { // CHECK:STDOUT: %s.param_patt: %struct_type.a.b.1 = value_param_pattern %s.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%int_32.loc11_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.1: type = value_of_initializer %int.make_type_signed.loc11_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_signed.loc11_14, %.loc11_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_23: init type = call constants.%Int(%int_32.loc11_23) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_23.1: type = value_of_initializer %int.make_type_signed.loc11_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_23.2: type = converted %int.make_type_signed.loc11_23, %.loc11_23.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1] // CHECK:STDOUT: %s.param: %struct_type.a.b.1 = value_param runtime_param0 // CHECK:STDOUT: %s: %struct_type.a.b.1 = bind_name s, %s.param @@ -96,27 +90,23 @@ fn F(cond: bool) { // CHECK:STDOUT: fn @F(%cond.param_patt: bool) { // CHECK:STDOUT: !entry: // 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: %i32.loc14_15: type = class_type @Int, @Int(constants.%int_32) [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: %i32.loc14_24: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1] // CHECK:STDOUT: %a.var: ref %struct_type.a.b.1 = var a // CHECK:STDOUT: %a: ref %struct_type.a.b.1 = bind_name a, %a.var // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc14_46.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc14_46.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14_46.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_46.1: = bound_method %int_1, %impl.elem0.loc14_46.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc14_46.1: = specific_function %Convert.bound.loc14_46.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc14_46.1: init %i32 = call %Convert.specific_fn.loc14_46.1(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc14_46.2: init %i32 = converted %int_1, %int.convert_checked.loc14_46.1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc14_46.3: ref %i32 = struct_access %a.var, element0 // CHECK:STDOUT: %.loc14_46.4: init %i32 = initialize_from %.loc14_46.2 to %.loc14_46.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc14_46.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14_46.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_46.2: = bound_method %int_2, %impl.elem0.loc14_46.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc14_46.2: = specific_function %Convert.bound.loc14_46.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc14_46.2: init %i32 = call %Convert.specific_fn.loc14_46.2(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/impl/compound.carbon b/toolchain/check/testdata/impl/compound.carbon index 99273abeec6b..4f6fa015cb59 100644 --- a/toolchain/check/testdata/impl/compound.carbon +++ b/toolchain/check/testdata/impl/compound.carbon @@ -38,27 +38,25 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Simple.type: type = facet_type <@Simple> [template] -// CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Self.1: %Simple.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %Simple.type, %F.type.1 [template] -// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @Simple.%F.decl [template] -// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] +// CHECK:STDOUT: %assoc0.1: %F.assoc_type = assoc_entity element0, @Simple.%F.decl [template] +// CHECK:STDOUT: %Self.as_type.1: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %G.type.1: type = fn_type @G.1 [template] // CHECK:STDOUT: %G.1: %G.type.1 = struct_value () [template] // CHECK:STDOUT: %G.assoc_type: type = assoc_entity_type %Simple.type, %G.type.1 [template] // CHECK:STDOUT: %assoc1: %G.assoc_type = assoc_entity element1, @Simple.%G.decl [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %G.type.2: type = fn_type @G.2 [template] // CHECK:STDOUT: %G.2: %G.type.2 = struct_value () [template] // CHECK:STDOUT: %Simple.facet: %Simple.type = facet_value %i32, %i32 [template] -// CHECK:STDOUT: %interface: = interface_witness (%F.2, %G.2) [template] +// CHECK:STDOUT: %interface.1: = interface_witness (%F.2, %G.2) [template] // CHECK:STDOUT: %NonInstanceCall.type: type = fn_type @NonInstanceCall [template] // CHECK:STDOUT: %NonInstanceCall: %NonInstanceCall.type = struct_value () [template] // CHECK:STDOUT: %InstanceCall.type: type = fn_type @InstanceCall [template] @@ -72,7 +70,7 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -89,11 +87,9 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Simple.decl: type = interface_decl @Simple [template = constants.%Simple.type] {} {} -// CHECK:STDOUT: impl_decl @impl [template] {} { +// CHECK:STDOUT: impl_decl @impl.1 [template] {} { // 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: %.loc16_6.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_6.2: type = converted %int.make_type_signed, %.loc16_6.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %NonInstanceCall.decl: %NonInstanceCall.type = fn_decl @NonInstanceCall [template = constants.%NonInstanceCall] { @@ -101,9 +97,7 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc21_23.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc21_23.2: type = converted %int.make_type_signed, %.loc21_23.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: } @@ -112,9 +106,7 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc25_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc25_20.2: type = converted %int.make_type_signed, %.loc25_20.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: } @@ -123,9 +115,7 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %p.param_patt: %ptr = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc29_34.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc29_34.2: type = converted %int.make_type_signed, %.loc29_34.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr] // CHECK:STDOUT: %p.param: %ptr = value_param runtime_param0 // CHECK:STDOUT: %p: %ptr = bind_name p, %p.param @@ -135,9 +125,7 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %p.param_patt: %ptr = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc33_31.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc33_31.2: type = converted %int.make_type_signed, %.loc33_31.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr] // CHECK:STDOUT: %p.param: %ptr = value_param runtime_param0 // CHECK:STDOUT: %p: %ptr = bind_name p, %p.param @@ -145,18 +133,18 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Simple { -// CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] +// CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0.1] // CHECK:STDOUT: %G.decl: %G.type.1 = fn_decl @G.1 [template = constants.%G.1] { -// CHECK:STDOUT: %self.patt: @G.1.%Self.as_type.loc13_14.1 (%Self.as_type) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @G.1.%Self.as_type.loc13_14.1 (%Self.as_type) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @G.1.%Self.as_type.loc13_14.1 (%Self.as_type.1) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @G.1.%Self.as_type.loc13_14.1 (%Self.as_type.1) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: %Simple.type = name_ref Self, @Simple.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc13_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc13: type = converted %Self.ref, %Self.as_type.loc13_14.2 [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %self.param: @G.1.%Self.as_type.loc13_14.1 (%Self.as_type) = value_param runtime_param0 -// CHECK:STDOUT: %self: @G.1.%Self.as_type.loc13_14.1 (%Self.as_type) = bind_name self, %self.param +// CHECK:STDOUT: %Self.ref: %Simple.type = name_ref Self, @Simple.%Self [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: %Self.as_type.loc13_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: %.loc13: type = converted %Self.ref, %Self.as_type.loc13_14.2 [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: %self.param: @G.1.%Self.as_type.loc13_14.1 (%Self.as_type.1) = value_param runtime_param0 +// CHECK:STDOUT: %self: @G.1.%Self.as_type.loc13_14.1 (%Self.as_type.1) = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc1: %G.assoc_type = assoc_entity element1, %G.decl [template = constants.%assoc1] // CHECK:STDOUT: @@ -167,20 +155,18 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: witness = (%F.decl, %G.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: %.loc16_6.2 as %Simple.ref { +// CHECK:STDOUT: impl @impl.1: %i32 as %Simple.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} // CHECK:STDOUT: %G.decl: %G.type.2 = fn_decl @G.2 [template = constants.%G.2] { // CHECK:STDOUT: %self.patt: %i32 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %i32 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc18_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc18_14.2: type = converted %int.make_type_signed, %.loc18_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %self: %i32 = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %interface: = interface_witness (%F.decl, %G.decl) [template = constants.%interface] +// CHECK:STDOUT: %interface: = interface_witness (%F.decl, %G.decl) [template = constants.%interface.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -194,10 +180,10 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @G.1(@Simple.%Self: %Simple.type) { -// CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc13_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: %Self.as_type.loc13_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @G.1.%Self.as_type.loc13_14.1 (%Self.as_type)](); +// CHECK:STDOUT: fn[%self.param_patt: @G.1.%Self.as_type.loc13_14.1 (%Self.as_type.1)](); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2(); @@ -208,8 +194,8 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] -// CHECK:STDOUT: %F.ref: %F.assoc_type = name_ref F, @Simple.%assoc0 [template = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %F.type.1 = interface_witness_access constants.%interface, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.ref: %F.assoc_type = name_ref F, @Simple.%assoc0 [template = constants.%assoc0.1] +// CHECK:STDOUT: %impl.elem0: %F.type.1 = interface_witness_access constants.%interface.1, element0 [template = constants.%F.2] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %impl.elem0() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -219,7 +205,7 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] // CHECK:STDOUT: %G.ref: %G.assoc_type = name_ref G, @Simple.%assoc1 [template = constants.%assoc1] -// CHECK:STDOUT: %impl.elem1: %G.type.1 = interface_witness_access constants.%interface, element1 [template = constants.%G.2] +// CHECK:STDOUT: %impl.elem1: %G.type.1 = interface_witness_access constants.%interface.1, element1 [template = constants.%G.2] // CHECK:STDOUT: %G.bound: = bound_method %n.ref, %impl.elem1 // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.bound(%n.ref) // CHECK:STDOUT: return @@ -229,9 +215,9 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr = name_ref p, %p // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] -// CHECK:STDOUT: %F.ref: %F.assoc_type = name_ref F, @Simple.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %F.ref: %F.assoc_type = name_ref F, @Simple.%assoc0 [template = constants.%assoc0.1] // CHECK:STDOUT: %.loc30: ref %i32 = deref %p.ref -// CHECK:STDOUT: %impl.elem0: %F.type.1 = interface_witness_access constants.%interface, element0 [template = constants.%F.2] +// CHECK:STDOUT: %impl.elem0: %F.type.1 = interface_witness_access constants.%interface.1, element0 [template = constants.%F.2] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %impl.elem0() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -242,18 +228,18 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] // CHECK:STDOUT: %G.ref: %G.assoc_type = name_ref G, @Simple.%assoc1 [template = constants.%assoc1] // CHECK:STDOUT: %.loc34_4.1: ref %i32 = deref %p.ref -// CHECK:STDOUT: %impl.elem1: %G.type.1 = interface_witness_access constants.%interface, element1 [template = constants.%G.2] +// CHECK:STDOUT: %impl.elem1: %G.type.1 = interface_witness_access constants.%interface.1, element1 [template = constants.%G.2] // CHECK:STDOUT: %G.bound: = bound_method %.loc34_4.1, %impl.elem1 // CHECK:STDOUT: %.loc34_4.2: %i32 = bind_value %.loc34_4.1 // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.bound(%.loc34_4.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%Self) {} +// CHECK:STDOUT: specific @F.1(constants.%Self.1) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @G.1(constants.%Self) { -// CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %Self.as_type.loc13_14.1 => constants.%Self.as_type +// CHECK:STDOUT: specific @G.1(constants.%Self.1) { +// CHECK:STDOUT: %Self => constants.%Self.1 +// CHECK:STDOUT: %Self.as_type.loc13_14.1 => constants.%Self.as_type.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Simple.facet) {} diff --git a/toolchain/check/testdata/impl/declaration.carbon b/toolchain/check/testdata/impl/declaration.carbon index 74eef971916a..5447e66bcbf0 100644 --- a/toolchain/check/testdata/impl/declaration.carbon +++ b/toolchain/check/testdata/impl/declaration.carbon @@ -18,14 +18,12 @@ impl i32 as I; // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -40,9 +38,7 @@ impl i32 as I; // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { // 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_6.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_6.2: type = converted %int.make_type_signed, %.loc13_6.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -55,5 +51,5 @@ impl i32 as I; // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: %.loc13_6.2 as %I.ref; +// CHECK:STDOUT: impl @impl: %i32 as %I.ref; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/empty.carbon b/toolchain/check/testdata/impl/empty.carbon index 41161997c5b6..320a54113318 100644 --- a/toolchain/check/testdata/impl/empty.carbon +++ b/toolchain/check/testdata/impl/empty.carbon @@ -20,15 +20,13 @@ impl i32 as Empty { // CHECK:STDOUT: %Empty.type: type = facet_type <@Empty> [template] // CHECK:STDOUT: %Self: %Empty.type = bind_symbolic_name Self, 0 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %interface: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -43,9 +41,7 @@ impl i32 as Empty { // CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [template = constants.%Empty.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { // 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: %.loc14_6.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_6.2: type = converted %int.make_type_signed, %.loc14_6.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [template = constants.%Empty.type] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -58,7 +54,7 @@ impl i32 as Empty { // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: %.loc14_6.2 as %Empty.ref { +// CHECK:STDOUT: impl @impl: %i32 as %Empty.ref { // CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: diff --git a/toolchain/check/testdata/impl/extend_impl_generic.carbon b/toolchain/check/testdata/impl/extend_impl_generic.carbon index 121ab9fe35c0..93af6ffbb277 100644 --- a/toolchain/check/testdata/impl/extend_impl_generic.carbon +++ b/toolchain/check/testdata/impl/extend_impl_generic.carbon @@ -62,12 +62,10 @@ class X(U:! type) { // CHECK:STDOUT: %assoc0.1: %F.assoc_type.1 = assoc_entity element0, @HasF.%F.decl [symbolic] // CHECK:STDOUT: %Param: type = class_type @Param [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Param.elem: type = unbound_element_type %Param, %i32 [template] // CHECK:STDOUT: %struct_type.x.1: type = struct_type {.x: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.x.1 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.x.1 [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %HasF.type.3: type = facet_type <@HasF, @HasF(%Param)> [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.1, @HasF(%Param) [template] @@ -79,14 +77,14 @@ class X(U:! type) { // CHECK:STDOUT: %HasF.facet: %HasF.type.2 = facet_value %C, %C [symbolic] // CHECK:STDOUT: %interface.1: = interface_witness (%F.3) [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %struct_type.x.2: type = struct_type {.x: 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.2(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %Param.val: %Param = struct_value (%int_2.2) [template] @@ -97,7 +95,7 @@ class X(U:! type) { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -180,15 +178,13 @@ class X(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: class @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: %.loc9_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc9_10.2: type = converted %int.make_type_signed, %.loc9_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_8: %Param.elem = field_decl x, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.1 [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc9: %Param.elem = field_decl x, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.1 [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Param -// CHECK:STDOUT: .x = %.loc9_8 +// CHECK:STDOUT: .x = %.loc9 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -199,7 +195,7 @@ class X(U:! type) { // CHECK:STDOUT: %Param.ref: type = name_ref Param, file.%Param.decl [template = constants.%Param] // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(constants.%Param)> [template = constants.%HasF.type.3] // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -217,7 +213,7 @@ class X(U:! type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc15_21.1: %struct_type.x.2 = struct_literal (%int_2) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_2) [template = constants.%int_2.2] @@ -232,9 +228,7 @@ class X(U:! type) { // CHECK:STDOUT: fn @G(%c.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_10.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_10.2: type = converted %int.make_type_signed.loc21, %.loc21_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %C.ref.loc21: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc21_17: %F.assoc_type.2 = specific_constant @HasF.%assoc0.loc5_14.1, @HasF(constants.%Param) [template = constants.%assoc0.2] // CHECK:STDOUT: %F.ref.loc21: %F.assoc_type.2 = name_ref F, %.loc21_17 [template = constants.%assoc0.2] @@ -242,14 +236,12 @@ class X(U:! type) { // CHECK:STDOUT: %.loc21_20.1: ref %Param = temporary_storage // CHECK:STDOUT: %F.call.loc21: init %Param = call %impl.elem0.loc21() to %.loc21_20.1 // CHECK:STDOUT: %.loc21_20.2: ref %Param = temporary %.loc21_20.1, %F.call.loc21 -// CHECK:STDOUT: %x.ref.loc21: %Param.elem = name_ref x, @Param.%.loc9_8 [template = @Param.%.loc9_8] +// CHECK:STDOUT: %x.ref.loc21: %Param.elem = name_ref x, @Param.%.loc9 [template = @Param.%.loc9] // CHECK:STDOUT: %.loc21_21.1: ref %i32 = class_element_access %.loc21_20.2, element0 // CHECK:STDOUT: %.loc21_21.2: %i32 = bind_value %.loc21_21.1 // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc21_21.2 // 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_10.1: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] -// CHECK:STDOUT: %.loc22_10.2: type = converted %int.make_type_signed.loc22, %.loc22_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: %c.ref: %C = name_ref c, %c @@ -259,7 +251,7 @@ class X(U:! type) { // CHECK:STDOUT: %.loc22_20.1: ref %Param = temporary_storage // CHECK:STDOUT: %F.call.loc22: init %Param = call %impl.elem0.loc22() to %.loc22_20.1 // CHECK:STDOUT: %.loc22_20.2: ref %Param = temporary %.loc22_20.1, %F.call.loc22 -// CHECK:STDOUT: %x.ref.loc22: %Param.elem = name_ref x, @Param.%.loc9_8 [template = @Param.%.loc9_8] +// CHECK:STDOUT: %x.ref.loc22: %Param.elem = name_ref x, @Param.%.loc9 [template = @Param.%.loc9] // CHECK:STDOUT: %.loc22_21.1: ref %i32 = class_element_access %.loc22_20.2, element0 // CHECK:STDOUT: %.loc22_21.2: %i32 = bind_value %.loc22_21.1 // CHECK:STDOUT: assign %b.var, %.loc22_21.2 diff --git a/toolchain/check/testdata/impl/fail_call_invalid.carbon b/toolchain/check/testdata/impl/fail_call_invalid.carbon index 8cea59c23446..c145cada11d0 100644 --- a/toolchain/check/testdata/impl/fail_call_invalid.carbon +++ b/toolchain/check/testdata/impl/fail_call_invalid.carbon @@ -27,16 +27,14 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Simple.type: type = facet_type <@Simple> [template] -// CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] +// CHECK:STDOUT: %Self.1: %Simple.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %Self.as_type.1: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %G.type.1: type = fn_type @G.1 [template] // CHECK:STDOUT: %G.1: %G.type.1 = struct_value () [template] // CHECK:STDOUT: %G.assoc_type: type = assoc_entity_type %Simple.type, %G.type.1 [template] -// CHECK:STDOUT: %assoc0: %G.assoc_type = assoc_entity element0, @Simple.%G.decl [template] +// CHECK:STDOUT: %assoc0.1: %G.assoc_type = assoc_entity element0, @Simple.%G.decl [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %G.type.2: type = fn_type @G.2 [template] // CHECK:STDOUT: %G.2: %G.type.2 = struct_value () [template] // CHECK:STDOUT: %Simple.facet: %Simple.type = facet_value %i32, %i32 [template] @@ -46,7 +44,7 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -60,11 +58,9 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Simple.decl: type = interface_decl @Simple [template = constants.%Simple.type] {} {} -// CHECK:STDOUT: impl_decl @impl [template] {} { +// CHECK:STDOUT: impl_decl @impl.1 [template] {} { // 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: %.loc15_6.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_6.2: type = converted %int.make_type_signed, %.loc15_6.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] // CHECK:STDOUT: } // CHECK:STDOUT: %InstanceCall.decl: %InstanceCall.type = fn_decl @InstanceCall [template = constants.%InstanceCall] { @@ -72,27 +68,25 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc22_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc22_20.2: type = converted %int.make_type_signed, %.loc22_20.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Simple { -// CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: %G.decl: %G.type.1 = fn_decl @G.1 [template = constants.%G.1] { -// CHECK:STDOUT: %self.patt: @G.1.%Self.as_type.loc12_14.1 (%Self.as_type) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @G.1.%Self.as_type.loc12_14.1 (%Self.as_type) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @G.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @G.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: %Simple.type = name_ref Self, @Simple.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc12_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc12: type = converted %Self.ref, %Self.as_type.loc12_14.2 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %self.param: @G.1.%Self.as_type.loc12_14.1 (%Self.as_type) = value_param runtime_param0 -// CHECK:STDOUT: %self: @G.1.%Self.as_type.loc12_14.1 (%Self.as_type) = bind_name self, %self.param +// CHECK:STDOUT: %Self.ref: %Simple.type = name_ref Self, @Simple.%Self [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: %Self.as_type.loc12_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: %.loc12: type = converted %Self.ref, %Self.as_type.loc12_14.2 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: %self.param: @G.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = value_param runtime_param0 +// CHECK:STDOUT: %self: @G.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %G.assoc_type = assoc_entity element0, %G.decl [template = constants.%assoc0] +// CHECK:STDOUT: %assoc0: %G.assoc_type = assoc_entity element0, %G.decl [template = constants.%assoc0.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -100,7 +94,7 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: witness = (%G.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: %.loc15_6.2 as %Simple.ref { +// CHECK:STDOUT: impl @impl.1: %i32 as %Simple.ref { // CHECK:STDOUT: %G.decl: %G.type.2 = fn_decl @G.2 [template = constants.%G.2] { // CHECK:STDOUT: %self.patt: = binding_pattern self // CHECK:STDOUT: %self.param_patt: = value_param_pattern %self.patt, runtime_param0 @@ -117,10 +111,10 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @G.1(@Simple.%Self: %Simple.type) { -// CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc12_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: %Self.as_type.loc12_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @G.1.%Self.as_type.loc12_14.1 (%Self.as_type)](); +// CHECK:STDOUT: fn[%self.param_patt: @G.1.%Self.as_type.loc12_14.1 (%Self.as_type.1)](); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G.2[%self.param_patt: ](); @@ -129,15 +123,15 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] -// CHECK:STDOUT: %G.ref: %G.assoc_type = name_ref G, @Simple.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %G.ref: %G.assoc_type = name_ref G, @Simple.%assoc0 [template = constants.%assoc0.1] // CHECK:STDOUT: %impl.elem0: %G.type.1 = interface_witness_access , element0 [template = ] // CHECK:STDOUT: %G.bound: = bound_method %n.ref, %impl.elem0 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @G.1(constants.%Self) { -// CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %Self.as_type.loc12_14.1 => constants.%Self.as_type +// CHECK:STDOUT: specific @G.1(constants.%Self.1) { +// CHECK:STDOUT: %Self => constants.%Self.1 +// CHECK:STDOUT: %Self.as_type.loc12_14.1 => constants.%Self.as_type.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G.1(constants.%Simple.facet) { diff --git a/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon b/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon index a8b085e0931e..49164232a411 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon @@ -21,15 +21,13 @@ extend impl i32 as I {} // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %interface: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -44,9 +42,7 @@ extend impl i32 as I {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { // 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: %.loc16_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_13.2: type = converted %int.make_type_signed, %.loc16_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -59,7 +55,7 @@ extend impl i32 as I {} // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: %.loc16_13.2 as %I.ref { +// CHECK:STDOUT: impl @impl: %i32 as %I.ref { // CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: diff --git a/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon b/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon index 482e58d07fff..d91519cdd77f 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon @@ -46,19 +46,17 @@ class E { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %C: type = class_type @C [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %interface: = interface_witness () [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %E: type = class_type @E [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -87,7 +85,7 @@ class E { // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: %.loc18_15.2 as %I.ref { +// CHECK:STDOUT: impl @impl.1: %i32 as %I.ref { // CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -106,12 +104,10 @@ class E { // CHECK:STDOUT: class @C { // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // 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: %.loc18_15.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc18_15.2: type = converted %int.make_type_signed, %.loc18_15.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -124,7 +120,7 @@ class E { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D @@ -137,7 +133,7 @@ class E { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [template = constants.%E] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%E diff --git a/toolchain/check/testdata/impl/fail_extend_non_interface.carbon b/toolchain/check/testdata/impl/fail_extend_non_interface.carbon index 6267201553d5..0fce8555f406 100644 --- a/toolchain/check/testdata/impl/fail_extend_non_interface.carbon +++ b/toolchain/check/testdata/impl/fail_extend_non_interface.carbon @@ -20,16 +20,14 @@ class C { // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -44,17 +42,15 @@ class C { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: %Self.ref as @C.%.loc15_18.2; +// CHECK:STDOUT: impl @impl: %Self.ref as %i32; // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc15_18.1: type = value_of_initializer @impl.%int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_18.2: type = converted @impl.%int.make_type_signed, %.loc15_18.1 [template = constants.%i32] // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C diff --git a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon index af6d29d9c9df..642aa9c32eba 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon @@ -224,7 +224,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %assoc0.1: %F.assoc_type.1 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %NoF: type = class_type @NoF [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %FNotFunction: type = class_type @FNotFunction [template] // CHECK:STDOUT: %F.2: type = class_type @F.16 [template] // CHECK:STDOUT: %PossiblyF.type: type = fn_type @PossiblyF [template] @@ -283,9 +283,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.3 [symbolic] // CHECK:STDOUT: %ptr.1: type = ptr_type %Self.as_type [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %struct_type.x.y.1: type = struct_type {.x: %Self.as_type, .y: %i32} [symbolic] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%ptr.1, %struct_type.x.y.1) [symbolic] @@ -430,9 +428,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.as_type.loc188_24: type = facet_access_type %Self.ref.loc188_24 [symbolic = %Self.as_type.loc188_16.1 (constants.%Self.as_type)] // CHECK:STDOUT: %.loc188_24: type = converted %Self.ref.loc188_24, %Self.as_type.loc188_24 [symbolic = %Self.as_type.loc188_16.1 (constants.%Self.as_type)] // 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: %.loc188_34.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc188_34.2: type = converted %int.make_type_signed, %.loc188_34.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.x.y.loc188_37.2: type = struct_type {.x: %Self.as_type, .y: %i32} [symbolic = %struct_type.x.y.loc188_37.1 (constants.%struct_type.x.y.1)] // CHECK:STDOUT: %.loc188_38.1: %tuple.type.1 = tuple_literal (%ptr.loc188_16.2, %struct_type.x.y.loc188_37.2) // CHECK:STDOUT: %.loc188_38.2: type = converted %.loc188_38.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)] @@ -739,13 +735,9 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %SelfNestedBadParam.ref.loc200_14: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [template = constants.%SelfNestedBadParam] // CHECK:STDOUT: %ptr: type = ptr_type %SelfNestedBadParam [template = constants.%ptr.2] // CHECK:STDOUT: %int_32.loc200_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc200_40: init type = call constants.%Int(%int_32.loc200_40) [template = constants.%i32] -// CHECK:STDOUT: %.loc200_40.1: type = value_of_initializer %int.make_type_signed.loc200_40 [template = constants.%i32] -// CHECK:STDOUT: %.loc200_40.2: type = converted %int.make_type_signed.loc200_40, %.loc200_40.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc200_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc200_49: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc200_49: init type = call constants.%Int(%int_32.loc200_49) [template = constants.%i32] -// CHECK:STDOUT: %.loc200_49.1: type = value_of_initializer %int.make_type_signed.loc200_49 [template = constants.%i32] -// CHECK:STDOUT: %.loc200_49.2: type = converted %int.make_type_signed.loc200_49, %.loc200_49.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc200_49: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.x.y: type = struct_type {.x: %i32, .y: %i32} [template = constants.%struct_type.x.y.2] // CHECK:STDOUT: %.loc200_53.1: %tuple.type.1 = tuple_literal (%ptr, %struct_type.x.y) // CHECK:STDOUT: %.loc200_53.2: type = converted %.loc200_53.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] @@ -775,9 +767,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %ptr: type = ptr_type %SelfNestedBadReturnType [template = constants.%ptr.3] // CHECK:STDOUT: %SelfNestedBadReturnType.ref.loc212_45: type = name_ref SelfNestedBadReturnType, file.%SelfNestedBadReturnType.decl [template = constants.%SelfNestedBadReturnType] // 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: %.loc212_74.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc212_74.2: type = converted %int.make_type_signed, %.loc212_74.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.x.y: type = struct_type {.x: %SelfNestedBadReturnType, .y: %i32} [template = constants.%struct_type.x.y.4] // CHECK:STDOUT: %.loc212_78.1: %tuple.type.1 = tuple_literal (%ptr, %struct_type.x.y) // CHECK:STDOUT: %.loc212_78.2: type = converted %.loc212_78.1, constants.%tuple.type.5 [template = constants.%tuple.type.5] @@ -801,7 +791,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%NoF [template = constants.%NoF] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%NoF @@ -813,7 +803,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FNotFunction [template = constants.%FNotFunction] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FNotFunction @@ -827,7 +817,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FAlias [template = constants.%FAlias] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FAlias @@ -839,7 +829,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraParam [template = constants.%FExtraParam] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FExtraParam @@ -851,7 +841,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraImplicitParam [template = constants.%FExtraImplicitParam] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FExtraImplicitParam @@ -863,7 +853,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraReturnType [template = constants.%FExtraReturnType] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FExtraReturnType @@ -875,7 +865,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FMissingParam [template = constants.%FMissingParam] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FMissingParam @@ -887,7 +877,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FMissingImplicitParam [template = constants.%FMissingImplicitParam] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FMissingImplicitParam @@ -899,7 +889,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FMissingReturnType [template = constants.%FMissingReturnType] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FMissingReturnType @@ -911,7 +901,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentParamType [template = constants.%FDifferentParamType] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FDifferentParamType @@ -923,7 +913,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentImplicitParamType [template = constants.%FDifferentImplicitParamType] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FDifferentImplicitParamType @@ -935,7 +925,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentReturnType [template = constants.%FDifferentReturnType] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FDifferentReturnType @@ -947,7 +937,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentParamName [template = constants.%FDifferentParamName] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%FDifferentParamName @@ -959,7 +949,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%SelfNestedBadParam [template = constants.%SelfNestedBadParam] // CHECK:STDOUT: %SelfNested.ref: type = name_ref SelfNested, file.%SelfNested.decl [template = constants.%SelfNested.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SelfNestedBadParam @@ -971,7 +961,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%SelfNestedBadReturnType [template = constants.%SelfNestedBadReturnType] // CHECK:STDOUT: %SelfNested.ref: type = name_ref SelfNested, file.%SelfNested.decl [template = constants.%SelfNested.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%SelfNestedBadReturnType diff --git a/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon b/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon index da50bddc369b..ccdd469256df 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon @@ -47,16 +47,14 @@ impl f64 as type where .Self impls type {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %false: bool = bool_literal false [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -67,17 +65,15 @@ impl f64 as type where .Self impls type {} // CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11: type = converted @impl.9.%false, [template = ] -// CHECK:STDOUT: impl_decl @impl.9 [template] {} { +// CHECK:STDOUT: %.loc11: type = converted @impl.%false, [template = ] +// CHECK:STDOUT: impl_decl @impl [template] {} { // 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_6.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_6.2: type = converted %int.make_type_signed, %.loc11_6.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %false: bool = bool_literal false [template = constants.%false] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.9: %.loc11_6.2 as { +// CHECK:STDOUT: impl @impl: %i32 as { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/fail_redefinition.carbon b/toolchain/check/testdata/impl/fail_redefinition.carbon index 31465dd4c68d..3de08eae5367 100644 --- a/toolchain/check/testdata/impl/fail_redefinition.carbon +++ b/toolchain/check/testdata/impl/fail_redefinition.carbon @@ -26,14 +26,12 @@ impl i32 as I {} // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -48,16 +46,12 @@ impl i32 as I {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { // 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_6.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_6.2: type = converted %int.make_type_signed.loc13, %.loc13_6.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %I.ref.loc13: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_6.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_6.2: type = converted %int.make_type_signed.loc21, %.loc21_6.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %I.ref.loc21: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -70,8 +64,8 @@ impl i32 as I {} // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: %.loc13_6.2 as %I.ref.loc13 { +// CHECK:STDOUT: impl @impl: %i32.loc13 as %I.ref.loc13 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = .inst36.loc13_15 +// CHECK:STDOUT: witness = .inst47.loc13_15 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon b/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon index becddd56aede..1a72c72aea83 100644 --- a/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon +++ b/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon @@ -35,7 +35,7 @@ impl i32 as I { // CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] // CHECK:STDOUT: %C.1: type = class_type @C, @C(%T, %X) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%I.type, %Self) [symbolic] @@ -44,9 +44,7 @@ impl i32 as I { // CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %I.type, %F.type.1 [template] // CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @I.%F.decl [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %C.3: type = class_type @C, @C(type, %i32) [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] @@ -56,7 +54,7 @@ impl i32 as I { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -84,9 +82,7 @@ impl i32 as I { // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { // 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: %.loc17_6.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc17_6.2: type = converted %int.make_type_signed, %.loc17_6.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -111,14 +107,14 @@ impl i32 as I { // CHECK:STDOUT: witness = (%F.decl) // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl: %.loc17_6.2 as %I.ref { +// CHECK:STDOUT: impl @impl: %i32 as %I.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %c.patt: %C.3 = binding_pattern c // CHECK:STDOUT: %c.param_patt: %C.3 = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %C: type = class_type @C, @C(type, constants.%i32) [template = constants.%C.3] // CHECK:STDOUT: %c.param: %C.3 = value_param runtime_param0 // CHECK:STDOUT: %c: %C.3 = bind_name c, %c.param @@ -139,7 +135,7 @@ impl i32 as I { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.1 diff --git a/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon b/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon index 9c7bb2a8cc20..156aec97460f 100644 --- a/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon +++ b/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon @@ -39,11 +39,9 @@ impl C as I { // CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] @@ -54,7 +52,7 @@ impl C as I { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -75,9 +73,7 @@ impl C as I { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc19_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc19_11.2: type = converted %int.make_type_signed, %.loc19_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -114,7 +110,7 @@ impl C as I { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C diff --git a/toolchain/check/testdata/impl/lookup/instance_method.carbon b/toolchain/check/testdata/impl/lookup/instance_method.carbon index 9f02d677e995..0bcaab9d7422 100644 --- a/toolchain/check/testdata/impl/lookup/instance_method.carbon +++ b/toolchain/check/testdata/impl/lookup/instance_method.carbon @@ -32,9 +32,7 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %I.type, %F.type.1 [template] @@ -44,14 +42,14 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %I.facet: %I.type = facet_value %C, %C [template] // CHECK:STDOUT: %interface: = interface_witness (%F.2) [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -76,9 +74,7 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl.loc11 [template = constants.%C] // 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: %.loc23_15.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc23_15.2: type = converted %int.make_type_signed, %.loc23_15.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %c.param: %C = value_param runtime_param0 // CHECK:STDOUT: %c: %C = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -96,11 +92,9 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type.loc14_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc14_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc14_14: type = converted %Self.ref, %Self.as_type.loc14_14.2 [symbolic = %Self.as_type.loc14_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc14: type = converted %Self.ref, %Self.as_type.loc14_14.2 [symbolic = %Self.as_type.loc14_14.1 (constants.%Self.as_type)] // 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: %.loc14_25.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_25.2: type = converted %int.make_type_signed, %.loc14_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc14_14.1 (%Self.as_type) = value_param runtime_param0 // CHECK:STDOUT: %self: @F.1.%Self.as_type.loc14_14.1 (%Self.as_type) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -123,9 +117,7 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // 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: %.loc19_27.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc19_27.2: type = converted %int.make_type_signed, %.loc19_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -143,7 +135,7 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C diff --git a/toolchain/check/testdata/impl/redeclaration.carbon b/toolchain/check/testdata/impl/redeclaration.carbon index aef05939bd1e..1c21ddb96860 100644 --- a/toolchain/check/testdata/impl/redeclaration.carbon +++ b/toolchain/check/testdata/impl/redeclaration.carbon @@ -24,18 +24,16 @@ impl i32 as I {} // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %X: type = class_type @X [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %interface: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -51,17 +49,13 @@ impl i32 as I {} // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // 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_6.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_6.2: type = converted %int.make_type_signed.loc13, %.loc13_6.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %I.ref.loc13: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: %X.decl: type = class_decl @X [template = constants.%X] {} {} // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // 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: %.loc19_6.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc19_6.2: type = converted %int.make_type_signed, %.loc19_6.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -74,9 +68,9 @@ impl i32 as I {} // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: %.loc13_6.2 as %I.ref.loc13; +// CHECK:STDOUT: impl @impl.1: %i32.loc13 as %I.ref.loc13; // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.2: %.loc19_6.2 as %I.ref { +// CHECK:STDOUT: impl @impl.2: %i32 as %I.ref { // CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -86,12 +80,10 @@ impl i32 as I {} // CHECK:STDOUT: class @X { // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // 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_8.1: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_8.2: type = converted %int.make_type_signed.loc16, %.loc16_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %I.ref.loc16: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%X diff --git a/toolchain/check/testdata/index/array_element_access.carbon b/toolchain/check/testdata/index/array_element_access.carbon index 9f6f29da36ef..b712a43989a5 100644 --- a/toolchain/check/testdata/index/array_element_access.carbon +++ b/toolchain/check/testdata/index/array_element_access.carbon @@ -17,9 +17,7 @@ var d: i32 = a[b]; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %array_type: type = array_type %int_2, %i32 [template] // CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] @@ -27,21 +25,21 @@ var d: i32 = a[b]; // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_24.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_24.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_24.2: %i32 = int_value 24 [template] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_12.2, %int_24.2) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -49,7 +47,7 @@ var d: i32 = a[b]; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -65,29 +63,21 @@ var d: i32 = a[b]; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] -// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed.loc11, %.loc11_9.1 [template = constants.%i32] // CHECK:STDOUT: %array_type: type = array_type %int_2, %i32 [template = constants.%array_type] // CHECK:STDOUT: %a.var: ref %array_type = var a // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var // 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_8.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_signed.loc12, %.loc12_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // 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_8.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8.2: type = converted %int.make_type_signed.loc13, %.loc13_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %c.var: ref %i32 = var c // CHECK:STDOUT: %c: ref %i32 = bind_name c, %c.var // CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%int_32.loc14) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_8.1: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_8.2: type = converted %int.make_type_signed.loc14, %.loc14_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %d.var: ref %i32 = var d // CHECK:STDOUT: %d: ref %i32 = bind_name d, %d.var // CHECK:STDOUT: } @@ -97,7 +87,7 @@ var d: i32 = a[b]; // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] // CHECK:STDOUT: %int_24: Core.IntLiteral = int_value 24 [template = constants.%int_24.1] // CHECK:STDOUT: %.loc11_26.1: %tuple.type = tuple_literal (%int_12, %int_24) -// CHECK:STDOUT: %impl.elem0.loc11_26.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_26.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_26.1: = bound_method %int_12, %impl.elem0.loc11_26.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_26.1: = specific_function %Convert.bound.loc11_26.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_26.1: init %i32 = call %Convert.specific_fn.loc11_26.1(%int_12) [template = constants.%int_12.2] @@ -105,7 +95,7 @@ var d: i32 = a[b]; // CHECK:STDOUT: %int_0.loc11: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc11_26.3: ref %i32 = array_index file.%a.var, %int_0.loc11 // CHECK:STDOUT: %.loc11_26.4: init %i32 = initialize_from %.loc11_26.2 to %.loc11_26.3 [template = constants.%int_12.2] -// CHECK:STDOUT: %impl.elem0.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_26.2: = bound_method %int_24, %impl.elem0.loc11_26.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_26.2: = specific_function %Convert.bound.loc11_26.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_26.2: init %i32 = call %Convert.specific_fn.loc11_26.2(%int_24) [template = constants.%int_24.2] @@ -117,7 +107,7 @@ var d: i32 = a[b]; // CHECK:STDOUT: %.loc11_27: init %array_type = converted %.loc11_26.1, %.loc11_26.8 [template = constants.%array] // CHECK:STDOUT: assign file.%a.var, %.loc11_27 // CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12: = bound_method %int_1.loc12, %impl.elem0.loc12 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc12: = specific_function %Convert.bound.loc12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %Convert.specific_fn.loc12(%int_1.loc12) [template = constants.%int_1.2] @@ -126,28 +116,24 @@ var d: i32 = a[b]; // CHECK:STDOUT: %a.ref.loc13: ref %array_type = name_ref a, file.%a // CHECK:STDOUT: %int_0.loc13: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // 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_17.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_17.2: type = converted %int.make_type_signed.loc13, %.loc13_17.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13: = bound_method %int_0.loc13, %impl.elem0.loc13 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc13: = specific_function %Convert.bound.loc13, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %Convert.specific_fn.loc13(%int_0.loc13) [template = constants.%int_0.2] // CHECK:STDOUT: %.loc13_16.1: %i32 = value_of_initializer %int.convert_checked.loc13 [template = constants.%int_0.2] // CHECK:STDOUT: %.loc13_16.2: %i32 = converted %int_0.loc13, %.loc13_16.1 [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc13_17.3: ref %i32 = array_index %a.ref.loc13, %.loc13_16.2 -// CHECK:STDOUT: %.loc13_17.4: %i32 = bind_value %.loc13_17.3 -// CHECK:STDOUT: assign file.%c.var, %.loc13_17.4 +// CHECK:STDOUT: %.loc13_17.1: ref %i32 = array_index %a.ref.loc13, %.loc13_16.2 +// CHECK:STDOUT: %.loc13_17.2: %i32 = bind_value %.loc13_17.1 +// CHECK:STDOUT: assign file.%c.var, %.loc13_17.2 // CHECK:STDOUT: %a.ref.loc14: ref %array_type = name_ref a, file.%a // CHECK:STDOUT: %b.ref: ref %i32 = name_ref b, file.%b // CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%int_32.loc14) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_17.1: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_17.2: type = converted %int.make_type_signed.loc14, %.loc14_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc14_16: %i32 = bind_value %b.ref -// CHECK:STDOUT: %.loc14_17.3: ref %i32 = array_index %a.ref.loc14, %.loc14_16 -// CHECK:STDOUT: %.loc14_17.4: %i32 = bind_value %.loc14_17.3 -// CHECK:STDOUT: assign file.%d.var, %.loc14_17.4 +// CHECK:STDOUT: %.loc14_17.1: ref %i32 = array_index %a.ref.loc14, %.loc14_16 +// CHECK:STDOUT: %.loc14_17.2: %i32 = bind_value %.loc14_17.1 +// CHECK:STDOUT: assign file.%d.var, %.loc14_17.2 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/index/expr_category.carbon b/toolchain/check/testdata/index/expr_category.carbon index 655f932d31f4..c3cf079c78ac 100644 --- a/toolchain/check/testdata/index/expr_category.carbon +++ b/toolchain/check/testdata/index/expr_category.carbon @@ -32,9 +32,7 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %array_type: type = array_type %int_3.1, %i32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -46,25 +44,25 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.2, %int_2.2, %int_3.2) [template] // CHECK:STDOUT: %ptr.2: type = ptr_type %i32 [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_4.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.5: = specific_function %Convert.bound.5, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: %ValueBinding.type: type = fn_type @ValueBinding [template] @@ -74,7 +72,7 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -93,10 +91,8 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %return.param_patt: %array_type = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc11_12.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_12.2: type = converted %int.make_type_signed, %.loc11_12.1 [template = constants.%i32] // CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template = constants.%array_type] // CHECK:STDOUT: %return.param: ref %array_type = out_param runtime_param0 // CHECK:STDOUT: %return: ref %array_type = return_slot %return.param @@ -106,10 +102,8 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %b.param_patt: %array_type = value_param_pattern %b.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_3.loc13: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_signed.loc13, %.loc13_10.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc13: type = array_type %int_3.loc13, %i32 [template = constants.%array_type] // CHECK:STDOUT: %b.param: %array_type = value_param runtime_param0 // CHECK:STDOUT: %b: %array_type = bind_name b, %b.param @@ -119,10 +113,8 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %b.param_patt: %array_type = value_param_pattern %b.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_3.loc21: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc21_21.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_21.2: type = converted %int.make_type_signed.loc21, %.loc21_21.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc21: type = array_type %int_3.loc21, %i32 [template = constants.%array_type] // CHECK:STDOUT: %b.param: %array_type = value_param runtime_param0 // CHECK:STDOUT: %b: %array_type = bind_name b, %b.param @@ -134,10 +126,8 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: fn @G(%b.param_patt: %array_type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%int_32.loc14) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_3.loc14_16: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc14_11.1: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_11.2: type = converted %int.make_type_signed.loc14, %.loc14_11.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc14: type = array_type %int_3.loc14_16, %i32 [template = constants.%array_type] // CHECK:STDOUT: %a.var: ref %array_type = var a // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var @@ -145,7 +135,7 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %int_2.loc14_25: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %int_3.loc14_28: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc14_29.1: %tuple.type = tuple_literal (%int_1.loc14_22, %int_2.loc14_25, %int_3.loc14_28) -// CHECK:STDOUT: %impl.elem0.loc14_29.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14_29.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_29.1: = bound_method %int_1.loc14_22, %impl.elem0.loc14_29.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc14_29.1: = specific_function %Convert.bound.loc14_29.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc14_29.1: init %i32 = call %Convert.specific_fn.loc14_29.1(%int_1.loc14_22) [template = constants.%int_1.2] @@ -153,7 +143,7 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %int_0.loc14: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc14_29.3: ref %i32 = array_index %a.var, %int_0.loc14 // CHECK:STDOUT: %.loc14_29.4: init %i32 = initialize_from %.loc14_29.2 to %.loc14_29.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc14_29.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14_29.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_29.2: = bound_method %int_2.loc14_25, %impl.elem0.loc14_29.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc14_29.2: = specific_function %Convert.bound.loc14_29.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc14_29.2: init %i32 = call %Convert.specific_fn.loc14_29.2(%int_2.loc14_25) [template = constants.%int_2.2] @@ -161,7 +151,7 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %int_1.loc14_29: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc14_29.6: ref %i32 = array_index %a.var, %int_1.loc14_29 // CHECK:STDOUT: %.loc14_29.7: init %i32 = initialize_from %.loc14_29.5 to %.loc14_29.6 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc14_29.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14_29.3: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_29.3: = bound_method %int_3.loc14_28, %impl.elem0.loc14_29.3 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc14_29.3: = specific_function %Convert.bound.loc14_29.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc14_29.3: init %i32 = call %Convert.specific_fn.loc14_29.3(%int_3.loc14_28) [template = constants.%int_3.2] @@ -173,57 +163,49 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %.loc14_30: init %array_type = converted %.loc14_29.1, %.loc14_29.11 [template = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc14_30 // CHECK:STDOUT: %int_32.loc17_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc17_11: init type = call constants.%Int(%int_32.loc17_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_14.1: type = value_of_initializer %int.make_type_signed.loc17_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_14.2: type = converted %int.make_type_signed.loc17_11, %.loc17_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc17_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr.2] // CHECK:STDOUT: %pa.var: ref %ptr.2 = var pa // CHECK:STDOUT: %pa: ref %ptr.2 = bind_name pa, %pa.var // CHECK:STDOUT: %a.ref.loc17: ref %array_type = name_ref a, %a // CHECK:STDOUT: %int_0.loc17: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_32.loc17_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc17_22: init type = call constants.%Int(%int_32.loc17_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_22.1: type = value_of_initializer %int.make_type_signed.loc17_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_22.2: type = converted %int.make_type_signed.loc17_22, %.loc17_22.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc17: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %i32.loc17_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc17: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc17: = bound_method %int_0.loc17, %impl.elem0.loc17 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc17: = specific_function %Convert.bound.loc17, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %Convert.specific_fn.loc17(%int_0.loc17) [template = constants.%int_0.2] // CHECK:STDOUT: %.loc17_21.1: %i32 = value_of_initializer %int.convert_checked.loc17 [template = constants.%int_0.2] // CHECK:STDOUT: %.loc17_21.2: %i32 = converted %int_0.loc17, %.loc17_21.1 [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc17_22.3: ref %i32 = array_index %a.ref.loc17, %.loc17_21.2 -// CHECK:STDOUT: %addr: %ptr.2 = addr_of %.loc17_22.3 +// CHECK:STDOUT: %.loc17_22: ref %i32 = array_index %a.ref.loc17, %.loc17_21.2 +// CHECK:STDOUT: %addr: %ptr.2 = addr_of %.loc17_22 // CHECK:STDOUT: assign %pa.var, %addr // CHECK:STDOUT: %a.ref.loc18: ref %array_type = name_ref a, %a // CHECK:STDOUT: %int_0.loc18: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // 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_6.1: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_6.2: type = converted %int.make_type_signed.loc18, %.loc18_6.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc18_5: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %i32.loc18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc18_5: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc18_5: = bound_method %int_0.loc18, %impl.elem0.loc18_5 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc18_5: = specific_function %Convert.bound.loc18_5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc18_5: init %i32 = call %Convert.specific_fn.loc18_5(%int_0.loc18) [template = constants.%int_0.2] // CHECK:STDOUT: %.loc18_5.1: %i32 = value_of_initializer %int.convert_checked.loc18_5 [template = constants.%int_0.2] // CHECK:STDOUT: %.loc18_5.2: %i32 = converted %int_0.loc18, %.loc18_5.1 [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc18_6.3: ref %i32 = array_index %a.ref.loc18, %.loc18_5.2 +// CHECK:STDOUT: %.loc18_6: ref %i32 = array_index %a.ref.loc18, %.loc18_5.2 // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] -// CHECK:STDOUT: %impl.elem0.loc18_8: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc18_8: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc18_8: = bound_method %int_4, %impl.elem0.loc18_8 [template = constants.%Convert.bound.5] // CHECK:STDOUT: %Convert.specific_fn.loc18_8: = specific_function %Convert.bound.loc18_8, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.5] // CHECK:STDOUT: %int.convert_checked.loc18_8: init %i32 = call %Convert.specific_fn.loc18_8(%int_4) [template = constants.%int_4.2] // CHECK:STDOUT: %.loc18_8: init %i32 = converted %int_4, %int.convert_checked.loc18_8 [template = constants.%int_4.2] -// CHECK:STDOUT: assign %.loc18_6.3, %.loc18_8 +// CHECK:STDOUT: assign %.loc18_6, %.loc18_8 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @ValueBinding(%b.param_patt: %array_type) { // CHECK:STDOUT: !entry: // 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: %i32.loc22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_3.loc22_16: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc22_11.1: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] -// CHECK:STDOUT: %.loc22_11.2: type = converted %int.make_type_signed.loc22, %.loc22_11.1 [template = constants.%i32] // CHECK:STDOUT: %array_type.loc22: type = array_type %int_3.loc22_16, %i32 [template = constants.%array_type] // CHECK:STDOUT: %a.var: ref %array_type = var a // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var @@ -231,7 +213,7 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %int_2.loc22_25: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %int_3.loc22_28: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc22_29.1: %tuple.type = tuple_literal (%int_1.loc22_22, %int_2.loc22_25, %int_3.loc22_28) -// CHECK:STDOUT: %impl.elem0.loc22_29.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc22_29.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc22_29.1: = bound_method %int_1.loc22_22, %impl.elem0.loc22_29.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc22_29.1: = specific_function %Convert.bound.loc22_29.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc22_29.1: init %i32 = call %Convert.specific_fn.loc22_29.1(%int_1.loc22_22) [template = constants.%int_1.2] @@ -239,7 +221,7 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %int_0.loc22: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc22_29.3: ref %i32 = array_index %a.var, %int_0.loc22 // CHECK:STDOUT: %.loc22_29.4: init %i32 = initialize_from %.loc22_29.2 to %.loc22_29.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc22_29.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc22_29.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc22_29.2: = bound_method %int_2.loc22_25, %impl.elem0.loc22_29.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc22_29.2: = specific_function %Convert.bound.loc22_29.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc22_29.2: init %i32 = call %Convert.specific_fn.loc22_29.2(%int_2.loc22_25) [template = constants.%int_2.2] @@ -247,7 +229,7 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %int_1.loc22_29: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc22_29.6: ref %i32 = array_index %a.var, %int_1.loc22_29 // CHECK:STDOUT: %.loc22_29.7: init %i32 = initialize_from %.loc22_29.5 to %.loc22_29.6 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc22_29.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc22_29.3: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc22_29.3: = bound_method %int_3.loc22_28, %impl.elem0.loc22_29.3 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc22_29.3: = specific_function %Convert.bound.loc22_29.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc22_29.3: init %i32 = call %Convert.specific_fn.loc22_29.3(%int_3.loc22_28) [template = constants.%int_3.2] @@ -261,48 +243,42 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %a.ref: ref %array_type = name_ref a, %a // CHECK:STDOUT: %int_0.loc26: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_32.loc26: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc26: init type = call constants.%Int(%int_32.loc26) [template = constants.%i32] -// CHECK:STDOUT: %.loc26_6.1: type = value_of_initializer %int.make_type_signed.loc26 [template = constants.%i32] -// CHECK:STDOUT: %.loc26_6.2: type = converted %int.make_type_signed.loc26, %.loc26_6.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %i32.loc26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc26: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc26: = bound_method %int_0.loc26, %impl.elem0.loc26 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc26: = specific_function %Convert.bound.loc26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc26: init %i32 = call %Convert.specific_fn.loc26(%int_0.loc26) [template = constants.%int_0.2] // CHECK:STDOUT: %.loc26_5.1: %i32 = value_of_initializer %int.convert_checked.loc26 [template = constants.%int_0.2] // CHECK:STDOUT: %.loc26_5.2: %i32 = converted %int_0.loc26, %.loc26_5.1 [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc26_6.3: ref %i32 = array_index %a.ref, %.loc26_5.2 +// CHECK:STDOUT: %.loc26_6: ref %i32 = array_index %a.ref, %.loc26_5.2 // CHECK:STDOUT: %b.ref: %array_type = name_ref b, %b // CHECK:STDOUT: %int_0.loc27: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_32.loc27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc27: init type = call constants.%Int(%int_32.loc27) [template = constants.%i32] -// CHECK:STDOUT: %.loc27_6.1: type = value_of_initializer %int.make_type_signed.loc27 [template = constants.%i32] -// CHECK:STDOUT: %.loc27_6.2: type = converted %int.make_type_signed.loc27, %.loc27_6.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc27: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %i32.loc27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc27: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc27: = bound_method %int_0.loc27, %impl.elem0.loc27 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc27: = specific_function %Convert.bound.loc27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc27: init %i32 = call %Convert.specific_fn.loc27(%int_0.loc27) [template = constants.%int_0.2] // CHECK:STDOUT: %.loc27_5.1: %i32 = value_of_initializer %int.convert_checked.loc27 [template = constants.%int_0.2] // CHECK:STDOUT: %.loc27_5.2: %i32 = converted %int_0.loc27, %.loc27_5.1 [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc27_6.3: ref %array_type = value_as_ref %b.ref -// CHECK:STDOUT: %.loc27_6.4: ref %i32 = array_index %.loc27_6.3, %.loc27_5.2 -// CHECK:STDOUT: %.loc27_6.5: %i32 = bind_value %.loc27_6.4 +// CHECK:STDOUT: %.loc27_6.1: ref %array_type = value_as_ref %b.ref +// CHECK:STDOUT: %.loc27_6.2: ref %i32 = array_index %.loc27_6.1, %.loc27_5.2 +// CHECK:STDOUT: %.loc27_6.3: %i32 = bind_value %.loc27_6.2 // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc28_5.1: ref %array_type = temporary_storage // CHECK:STDOUT: %F.call: init %array_type = call %F.ref() to %.loc28_5.1 // CHECK:STDOUT: %int_0.loc28: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc28_5.2: ref %array_type = temporary %.loc28_5.1, %F.call // CHECK:STDOUT: %int_32.loc28: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc28: init type = call constants.%Int(%int_32.loc28) [template = constants.%i32] -// CHECK:STDOUT: %.loc28_8.1: type = value_of_initializer %int.make_type_signed.loc28 [template = constants.%i32] -// CHECK:STDOUT: %.loc28_8.2: type = converted %int.make_type_signed.loc28, %.loc28_8.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc28: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %i32.loc28: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc28: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc28: = bound_method %int_0.loc28, %impl.elem0.loc28 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc28: = specific_function %Convert.bound.loc28, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc28: init %i32 = call %Convert.specific_fn.loc28(%int_0.loc28) [template = constants.%int_0.2] // CHECK:STDOUT: %.loc28_7.1: %i32 = value_of_initializer %int.convert_checked.loc28 [template = constants.%int_0.2] // CHECK:STDOUT: %.loc28_7.2: %i32 = converted %int_0.loc28, %.loc28_7.1 [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc28_8.3: ref %i32 = array_index %.loc28_5.2, %.loc28_7.2 -// CHECK:STDOUT: %.loc28_8.4: %i32 = bind_value %.loc28_8.3 +// CHECK:STDOUT: %.loc28_8.1: ref %i32 = array_index %.loc28_5.2, %.loc28_7.2 +// CHECK:STDOUT: %.loc28_8.2: %i32 = bind_value %.loc28_8.1 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/index/fail_array_large_index.carbon b/toolchain/check/testdata/index/fail_array_large_index.carbon index 49988c9bb324..a59163be8ae4 100644 --- a/toolchain/check/testdata/index/fail_array_large_index.carbon +++ b/toolchain/check/testdata/index/fail_array_large_index.carbon @@ -25,27 +25,25 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %array_type: type = array_type %int_1.1, %i32 [template] // CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral) [template] // CHECK:STDOUT: %int_0: 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_12.2) [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2147483647.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2147483647.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] // CHECK:STDOUT: } @@ -53,7 +51,7 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -68,23 +66,17 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed.loc11, %.loc11_9.1 [template = constants.%i32] // CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template = constants.%array_type] // CHECK:STDOUT: %a.var: ref %array_type = var a // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var // CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%int_32.loc17) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_8.1: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_8.2: type = converted %int.make_type_signed.loc17, %.loc17_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // 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_8.1: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] -// CHECK:STDOUT: %.loc22_8.2: type = converted %int.make_type_signed.loc22, %.loc22_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %c.var: ref %i32 = var c // CHECK:STDOUT: %c: ref %i32 = bind_name c, %c.var // CHECK:STDOUT: } @@ -93,7 +85,7 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] // CHECK:STDOUT: %.loc11_23.1: %tuple.type = tuple_literal (%int_12) -// CHECK:STDOUT: %impl.elem0.loc11: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11: = bound_method %int_12, %impl.elem0.loc11 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11: = specific_function %Convert.bound.loc11, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %Convert.specific_fn.loc11(%int_12) [template = constants.%int_12.2] @@ -107,33 +99,29 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: %a.ref.loc17: ref %array_type = name_ref a, file.%a // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%int_32.loc17) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_17.1: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_17.2: type = converted %int.make_type_signed.loc17, %.loc17_17.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc17: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %i32.loc17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc17: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc17: = bound_method %int_1, %impl.elem0.loc17 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc17: = specific_function %Convert.bound.loc17, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %Convert.specific_fn.loc17(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc17_16.1: %i32 = value_of_initializer %int.convert_checked.loc17 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc17_16.2: %i32 = converted %int_1, %.loc17_16.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc17_17.3: ref %i32 = array_index %a.ref.loc17, %.loc17_16.2 [template = ] -// CHECK:STDOUT: %.loc17_17.4: %i32 = bind_value %.loc17_17.3 -// CHECK:STDOUT: assign file.%b.var, %.loc17_17.4 +// CHECK:STDOUT: %.loc17_17.1: ref %i32 = array_index %a.ref.loc17, %.loc17_16.2 [template = ] +// CHECK:STDOUT: %.loc17_17.2: %i32 = bind_value %.loc17_17.1 +// CHECK:STDOUT: assign file.%b.var, %.loc17_17.2 // CHECK:STDOUT: %a.ref.loc22: ref %array_type = name_ref a, file.%a // CHECK:STDOUT: %int_2147483647: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] // 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_27.1: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] -// CHECK:STDOUT: %.loc22_27.2: type = converted %int.make_type_signed.loc22, %.loc22_27.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc22: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %i32.loc22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc22: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc22: = bound_method %int_2147483647, %impl.elem0.loc22 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc22: = specific_function %Convert.bound.loc22, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc22: init %i32 = call %Convert.specific_fn.loc22(%int_2147483647) [template = constants.%int_2147483647.2] // CHECK:STDOUT: %.loc22_16.1: %i32 = value_of_initializer %int.convert_checked.loc22 [template = constants.%int_2147483647.2] // CHECK:STDOUT: %.loc22_16.2: %i32 = converted %int_2147483647, %.loc22_16.1 [template = constants.%int_2147483647.2] -// CHECK:STDOUT: %.loc22_27.3: ref %i32 = array_index %a.ref.loc22, %.loc22_16.2 [template = ] -// CHECK:STDOUT: %.loc22_27.4: %i32 = bind_value %.loc22_27.3 -// CHECK:STDOUT: assign file.%c.var, %.loc22_27.4 +// CHECK:STDOUT: %.loc22_27.1: ref %i32 = array_index %a.ref.loc22, %.loc22_16.2 [template = ] +// CHECK:STDOUT: %.loc22_27.2: %i32 = bind_value %.loc22_27.1 +// CHECK:STDOUT: assign file.%c.var, %.loc22_27.2 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon index b38d5cb61491..d344adf94016 100644 --- a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon +++ b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon @@ -21,19 +21,17 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template] // CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral) [template] // CHECK:STDOUT: %int_0: 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_12.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_12.2) [template] @@ -43,7 +41,7 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -57,17 +55,13 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] -// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed.loc11, %.loc11_9.1 [template = constants.%i32] // CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template = constants.%array_type] // CHECK:STDOUT: %a.var: ref %array_type = var a // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var // 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_8.1: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_8.2: type = converted %int.make_type_signed.loc18, %.loc18_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } @@ -76,7 +70,7 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] // CHECK:STDOUT: %.loc11_23.1: %tuple.type = tuple_literal (%int_12) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_12, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_12) [template = constants.%int_12.2] @@ -90,13 +84,11 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: %a.ref: ref %array_type = name_ref a, file.%a // CHECK:STDOUT: %float: f64 = float_literal 2.6000000000000001 [template = constants.%float] // 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: %.loc18_19.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc18_19.2: type = converted %int.make_type_signed, %.loc18_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc18_16: %i32 = converted %float, [template = ] -// CHECK:STDOUT: %.loc18_19.3: ref %i32 = array_index %a.ref, [template = ] -// CHECK:STDOUT: %.loc18_19.4: %i32 = bind_value %.loc18_19.3 -// CHECK:STDOUT: assign file.%b.var, %.loc18_19.4 +// CHECK:STDOUT: %.loc18_19.1: ref %i32 = array_index %a.ref, [template = ] +// CHECK:STDOUT: %.loc18_19.2: %i32 = bind_value %.loc18_19.1 +// CHECK:STDOUT: assign file.%b.var, %.loc18_19.2 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon b/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon index 902df62dee1d..3d8a305a4615 100644 --- a/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon +++ b/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon @@ -18,23 +18,21 @@ var b: i32 = a[1]; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %array_type: type = array_type %int_1.1, %i32 [template] // CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral) [template] // CHECK:STDOUT: %int_0: 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_12.2) [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } @@ -42,7 +40,7 @@ var b: i32 = a[1]; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -56,17 +54,13 @@ var b: i32 = a[1]; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed.loc11, %.loc11_9.1 [template = constants.%i32] // CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template = constants.%array_type] // CHECK:STDOUT: %a.var: ref %array_type = var a // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var // 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: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } @@ -75,7 +69,7 @@ var b: i32 = a[1]; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] // CHECK:STDOUT: %.loc11_23.1: %tuple.type = tuple_literal (%int_12) -// CHECK:STDOUT: %impl.elem0.loc11: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11: = bound_method %int_12, %impl.elem0.loc11 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11: = specific_function %Convert.bound.loc11, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %Convert.specific_fn.loc11(%int_12) [template = constants.%int_12.2] @@ -89,18 +83,16 @@ var b: i32 = a[1]; // CHECK:STDOUT: %a.ref: ref %array_type = name_ref a, file.%a // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // 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: %.loc15_17.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_17.2: type = converted %int.make_type_signed, %.loc15_17.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc15: = bound_method %int_1, %impl.elem0.loc15 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc15: = specific_function %Convert.bound.loc15, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %Convert.specific_fn.loc15(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc15_16.1: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc15_16.2: %i32 = converted %int_1, %.loc15_16.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc15_17.3: ref %i32 = array_index %a.ref, %.loc15_16.2 [template = ] -// CHECK:STDOUT: %.loc15_17.4: %i32 = bind_value %.loc15_17.3 -// CHECK:STDOUT: assign file.%b.var, %.loc15_17.4 +// CHECK:STDOUT: %.loc15_17.1: ref %i32 = array_index %a.ref, %.loc15_16.2 [template = ] +// CHECK:STDOUT: %.loc15_17.2: %i32 = bind_value %.loc15_17.1 +// CHECK:STDOUT: assign file.%b.var, %.loc15_17.2 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/index/fail_expr_category.carbon b/toolchain/check/testdata/index/fail_expr_category.carbon index b3e2986691dc..7f0f1835a0b9 100644 --- a/toolchain/check/testdata/index/fail_expr_category.carbon +++ b/toolchain/check/testdata/index/fail_expr_category.carbon @@ -40,9 +40,7 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -52,14 +50,14 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: %ptr.2: type = ptr_type %i32 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_4.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: } @@ -67,7 +65,7 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -85,10 +83,8 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: %return.param_patt: %array_type = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] -// CHECK:STDOUT: %.loc11_12.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_12.2: type = converted %int.make_type_signed, %.loc11_12.1 [template = constants.%i32] // CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template = constants.%array_type] // CHECK:STDOUT: %return.param: ref %array_type = out_param runtime_param0 // CHECK:STDOUT: %return: ref %array_type = return_slot %return.param @@ -98,10 +94,8 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: %b.param_patt: %array_type = value_param_pattern %b.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] -// CHECK:STDOUT: %.loc13_10.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_signed.loc13, %.loc13_10.1 [template = constants.%i32] // CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template = constants.%array_type] // CHECK:STDOUT: %b.param: %array_type = value_param runtime_param0 // CHECK:STDOUT: %b: %array_type = bind_name b, %b.param @@ -113,55 +107,47 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: fn @G(%b.param_patt: %array_type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_32.loc19_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc19_11: init type = call constants.%Int(%int_32.loc19_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_14.1: type = value_of_initializer %int.make_type_signed.loc19_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_14.2: type = converted %int.make_type_signed.loc19_11, %.loc19_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc19_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ptr.loc19: type = ptr_type %i32 [template = constants.%ptr.2] // CHECK:STDOUT: %pb.var: ref %ptr.2 = var pb // CHECK:STDOUT: %pb: ref %ptr.2 = bind_name pb, %pb.var // CHECK:STDOUT: %b.ref.loc19: %array_type = name_ref b, %b // CHECK:STDOUT: %int_0.loc19: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_32.loc19_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc19_22: init type = call constants.%Int(%int_32.loc19_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_22.1: type = value_of_initializer %int.make_type_signed.loc19_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_22.2: type = converted %int.make_type_signed.loc19_22, %.loc19_22.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc19: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %i32.loc19_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc19: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc19: = bound_method %int_0.loc19, %impl.elem0.loc19 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc19: = specific_function %Convert.bound.loc19, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %Convert.specific_fn.loc19(%int_0.loc19) [template = constants.%int_0.2] // CHECK:STDOUT: %.loc19_21.1: %i32 = value_of_initializer %int.convert_checked.loc19 [template = constants.%int_0.2] // CHECK:STDOUT: %.loc19_21.2: %i32 = converted %int_0.loc19, %.loc19_21.1 [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc19_22.3: ref %array_type = value_as_ref %b.ref.loc19 -// CHECK:STDOUT: %.loc19_22.4: ref %i32 = array_index %.loc19_22.3, %.loc19_21.2 -// CHECK:STDOUT: %.loc19_22.5: %i32 = bind_value %.loc19_22.4 +// CHECK:STDOUT: %.loc19_22.1: ref %array_type = value_as_ref %b.ref.loc19 +// CHECK:STDOUT: %.loc19_22.2: ref %i32 = array_index %.loc19_22.1, %.loc19_21.2 +// CHECK:STDOUT: %.loc19_22.3: %i32 = bind_value %.loc19_22.2 // CHECK:STDOUT: %addr.loc19: %ptr.2 = addr_of [template = ] // CHECK:STDOUT: assign %pb.var, %addr.loc19 // CHECK:STDOUT: %b.ref.loc24: %array_type = name_ref b, %b // CHECK:STDOUT: %int_0.loc24: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_32.loc24: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc24: init type = call constants.%Int(%int_32.loc24) [template = constants.%i32] -// CHECK:STDOUT: %.loc24_6.1: type = value_of_initializer %int.make_type_signed.loc24 [template = constants.%i32] -// CHECK:STDOUT: %.loc24_6.2: type = converted %int.make_type_signed.loc24, %.loc24_6.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc24_5: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %i32.loc24: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc24_5: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc24_5: = bound_method %int_0.loc24, %impl.elem0.loc24_5 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc24_5: = specific_function %Convert.bound.loc24_5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc24_5: init %i32 = call %Convert.specific_fn.loc24_5(%int_0.loc24) [template = constants.%int_0.2] // CHECK:STDOUT: %.loc24_5.1: %i32 = value_of_initializer %int.convert_checked.loc24_5 [template = constants.%int_0.2] // CHECK:STDOUT: %.loc24_5.2: %i32 = converted %int_0.loc24, %.loc24_5.1 [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc24_6.3: ref %array_type = value_as_ref %b.ref.loc24 -// CHECK:STDOUT: %.loc24_6.4: ref %i32 = array_index %.loc24_6.3, %.loc24_5.2 -// CHECK:STDOUT: %.loc24_6.5: %i32 = bind_value %.loc24_6.4 +// CHECK:STDOUT: %.loc24_6.1: ref %array_type = value_as_ref %b.ref.loc24 +// CHECK:STDOUT: %.loc24_6.2: ref %i32 = array_index %.loc24_6.1, %.loc24_5.2 +// CHECK:STDOUT: %.loc24_6.3: %i32 = bind_value %.loc24_6.2 // CHECK:STDOUT: %int_4.loc24: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] -// CHECK:STDOUT: %impl.elem0.loc24_8: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc24_8: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc24_8: = bound_method %int_4.loc24, %impl.elem0.loc24_8 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc24_8: = specific_function %Convert.bound.loc24_8, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc24_8: init %i32 = call %Convert.specific_fn.loc24_8(%int_4.loc24) [template = constants.%int_4.2] // CHECK:STDOUT: %.loc24_8: init %i32 = converted %int_4.loc24, %int.convert_checked.loc24_8 [template = constants.%int_4.2] -// CHECK:STDOUT: assign %.loc24_6.5, %.loc24_8 +// CHECK:STDOUT: assign %.loc24_6.3, %.loc24_8 // CHECK:STDOUT: %int_32.loc32_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc32_11: init type = call constants.%Int(%int_32.loc32_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc32_14.1: type = value_of_initializer %int.make_type_signed.loc32_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc32_14.2: type = converted %int.make_type_signed.loc32_11, %.loc32_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc32_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ptr.loc32: type = ptr_type %i32 [template = constants.%ptr.2] // CHECK:STDOUT: %pf.var: ref %ptr.2 = var pf // CHECK:STDOUT: %pf: ref %ptr.2 = bind_name pf, %pf.var @@ -171,17 +157,15 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: %int_0.loc32: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc32_21.2: ref %array_type = temporary %.loc32_21.1, %F.call.loc32 // CHECK:STDOUT: %int_32.loc32_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc32_24: init type = call constants.%Int(%int_32.loc32_24) [template = constants.%i32] -// CHECK:STDOUT: %.loc32_24.1: type = value_of_initializer %int.make_type_signed.loc32_24 [template = constants.%i32] -// CHECK:STDOUT: %.loc32_24.2: type = converted %int.make_type_signed.loc32_24, %.loc32_24.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc32: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %i32.loc32_24: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc32: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc32: = bound_method %int_0.loc32, %impl.elem0.loc32 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc32: = specific_function %Convert.bound.loc32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc32: init %i32 = call %Convert.specific_fn.loc32(%int_0.loc32) [template = constants.%int_0.2] // CHECK:STDOUT: %.loc32_23.1: %i32 = value_of_initializer %int.convert_checked.loc32 [template = constants.%int_0.2] // CHECK:STDOUT: %.loc32_23.2: %i32 = converted %int_0.loc32, %.loc32_23.1 [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc32_24.3: ref %i32 = array_index %.loc32_21.2, %.loc32_23.2 -// CHECK:STDOUT: %.loc32_24.4: %i32 = bind_value %.loc32_24.3 +// CHECK:STDOUT: %.loc32_24.1: ref %i32 = array_index %.loc32_21.2, %.loc32_23.2 +// CHECK:STDOUT: %.loc32_24.2: %i32 = bind_value %.loc32_24.1 // CHECK:STDOUT: %addr.loc32: %ptr.2 = addr_of [template = ] // CHECK:STDOUT: assign %pf.var, %addr.loc32 // CHECK:STDOUT: %F.ref.loc36: %F.type = name_ref F, file.%F.decl [template = constants.%F] @@ -190,24 +174,22 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: %int_0.loc36: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc36_5.2: ref %array_type = temporary %.loc36_5.1, %F.call.loc36 // CHECK:STDOUT: %int_32.loc36: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc36: init type = call constants.%Int(%int_32.loc36) [template = constants.%i32] -// CHECK:STDOUT: %.loc36_8.1: type = value_of_initializer %int.make_type_signed.loc36 [template = constants.%i32] -// CHECK:STDOUT: %.loc36_8.2: type = converted %int.make_type_signed.loc36, %.loc36_8.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc36_7: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %i32.loc36: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc36_7: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc36_7: = bound_method %int_0.loc36, %impl.elem0.loc36_7 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc36_7: = specific_function %Convert.bound.loc36_7, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc36_7: init %i32 = call %Convert.specific_fn.loc36_7(%int_0.loc36) [template = constants.%int_0.2] // CHECK:STDOUT: %.loc36_7.1: %i32 = value_of_initializer %int.convert_checked.loc36_7 [template = constants.%int_0.2] // CHECK:STDOUT: %.loc36_7.2: %i32 = converted %int_0.loc36, %.loc36_7.1 [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc36_8.3: ref %i32 = array_index %.loc36_5.2, %.loc36_7.2 -// CHECK:STDOUT: %.loc36_8.4: %i32 = bind_value %.loc36_8.3 +// CHECK:STDOUT: %.loc36_8.1: ref %i32 = array_index %.loc36_5.2, %.loc36_7.2 +// CHECK:STDOUT: %.loc36_8.2: %i32 = bind_value %.loc36_8.1 // CHECK:STDOUT: %int_4.loc36: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] -// CHECK:STDOUT: %impl.elem0.loc36_10: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc36_10: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc36_10: = bound_method %int_4.loc36, %impl.elem0.loc36_10 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc36_10: = specific_function %Convert.bound.loc36_10, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc36_10: init %i32 = call %Convert.specific_fn.loc36_10(%int_4.loc36) [template = constants.%int_4.2] // CHECK:STDOUT: %.loc36_10: init %i32 = converted %int_4.loc36, %int.convert_checked.loc36_10 [template = constants.%int_4.2] -// CHECK:STDOUT: assign %.loc36_8.4, %.loc36_10 +// CHECK:STDOUT: assign %.loc36_8.2, %.loc36_10 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/index/fail_invalid_base.carbon b/toolchain/check/testdata/index/fail_invalid_base.carbon index a2ba3659c342..0685759d715a 100644 --- a/toolchain/check/testdata/index/fail_invalid_base.carbon +++ b/toolchain/check/testdata/index/fail_invalid_base.carbon @@ -37,9 +37,7 @@ var d: i32 = {.a: i32, .b: i32}[0]; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] @@ -53,7 +51,7 @@ var d: i32 = {.a: i32, .b: i32}[0]; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .IndexWith = %import_ref.2 +// CHECK:STDOUT: .IndexWith = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -72,28 +70,20 @@ var d: i32 = {.a: i32, .b: i32}[0]; // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %N: = namespace [template] {} // 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_8.1: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_8.2: type = converted %int.make_type_signed.loc16, %.loc16_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} // CHECK:STDOUT: %int_32.loc23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc23: init type = call constants.%Int(%int_32.loc23) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_8.1: type = value_of_initializer %int.make_type_signed.loc23 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_8.2: type = converted %int.make_type_signed.loc23, %.loc23_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: %int_32.loc29: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc29: init type = call constants.%Int(%int_32.loc29) [template = constants.%i32] -// CHECK:STDOUT: %.loc29_8.1: type = value_of_initializer %int.make_type_signed.loc29 [template = constants.%i32] -// CHECK:STDOUT: %.loc29_8.2: type = converted %int.make_type_signed.loc29, %.loc29_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc29: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %c.var: ref %i32 = var c // CHECK:STDOUT: %c: ref %i32 = bind_name c, %c.var // CHECK:STDOUT: %int_32.loc34: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc34: init type = call constants.%Int(%int_32.loc34) [template = constants.%i32] -// CHECK:STDOUT: %.loc34_8.1: type = value_of_initializer %int.make_type_signed.loc34 [template = constants.%i32] -// CHECK:STDOUT: %.loc34_8.2: type = converted %int.make_type_signed.loc34, %.loc34_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %d.var: ref %i32 = var d // CHECK:STDOUT: %d: ref %i32 = bind_name d, %d.var // CHECK:STDOUT: } @@ -116,13 +106,9 @@ var d: i32 = {.a: i32, .b: i32}[0]; // CHECK:STDOUT: %.loc29_29.2: %struct_type.a.b.1 = converted %.loc29_29.1, %struct [template = constants.%struct] // CHECK:STDOUT: assign file.%c.var, // CHECK:STDOUT: %int_32.loc34_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc34_19: init type = call constants.%Int(%int_32.loc34_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc34_19.1: type = value_of_initializer %int.make_type_signed.loc34_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc34_19.2: type = converted %int.make_type_signed.loc34_19, %.loc34_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc34_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc34_28: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc34_28: init type = call constants.%Int(%int_32.loc34_28) [template = constants.%i32] -// CHECK:STDOUT: %.loc34_28.1: type = value_of_initializer %int.make_type_signed.loc34_28 [template = constants.%i32] -// CHECK:STDOUT: %.loc34_28.2: type = converted %int.make_type_signed.loc34_28, %.loc34_28.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc34_28: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.2] // CHECK:STDOUT: %int_0.loc34: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: assign file.%d.var, diff --git a/toolchain/check/testdata/index/fail_name_not_found.carbon b/toolchain/check/testdata/index/fail_name_not_found.carbon index 21d205f16921..e369f788f325 100644 --- a/toolchain/check/testdata/index/fail_name_not_found.carbon +++ b/toolchain/check/testdata/index/fail_name_not_found.carbon @@ -21,15 +21,13 @@ fn Main() { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -47,9 +45,7 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // 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: %.loc15_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_10.2: type = converted %int.make_type_signed, %.loc15_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: %a.ref: = name_ref a, [template = ] diff --git a/toolchain/check/testdata/index/fail_negative_indexing.carbon b/toolchain/check/testdata/index/fail_negative_indexing.carbon index c62619df16cd..922b45ac905f 100644 --- a/toolchain/check/testdata/index/fail_negative_indexing.carbon +++ b/toolchain/check/testdata/index/fail_negative_indexing.carbon @@ -19,19 +19,17 @@ var d: i32 = c[-10]; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %array_type: type = array_type %int_2, %i32 [template] // CHECK:STDOUT: %int_42.1: Core.IntLiteral = int_value 42 [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %int_0: 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_42.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_42.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_42.2: %i32 = int_value 42 [template] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] @@ -42,8 +40,8 @@ var d: i32 = c[-10]; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 -// CHECK:STDOUT: .Negate = %import_ref.38 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 +// CHECK:STDOUT: .Negate = %import_ref.193 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -57,17 +55,13 @@ var d: i32 = c[-10]; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] -// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed.loc11, %.loc11_9.1 [template = constants.%i32] // CHECK:STDOUT: %array_type: type = array_type %int_2, %i32 [template = constants.%array_type] // CHECK:STDOUT: %c.var: ref %array_type = var c // CHECK:STDOUT: %c: ref %array_type = bind_name c, %c.var // 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: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %d.var: ref %i32 = var d // CHECK:STDOUT: %d: ref %i32 = bind_name d, %d.var // CHECK:STDOUT: } @@ -77,7 +71,7 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %int_42.loc11_20: Core.IntLiteral = int_value 42 [template = constants.%int_42.1] // CHECK:STDOUT: %int_42.loc11_24: Core.IntLiteral = int_value 42 [template = constants.%int_42.1] // CHECK:STDOUT: %.loc11_26.1: %tuple.type = tuple_literal (%int_42.loc11_20, %int_42.loc11_24) -// CHECK:STDOUT: %impl.elem0.loc11_26.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_26.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_26.1: = bound_method %int_42.loc11_20, %impl.elem0.loc11_26.1 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc11_26.1: = specific_function %Convert.bound.loc11_26.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc11_26.1: init %i32 = call %Convert.specific_fn.loc11_26.1(%int_42.loc11_20) [template = constants.%int_42.2] @@ -85,7 +79,7 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %.loc11_26.3: ref %i32 = array_index file.%c.var, %int_0 // CHECK:STDOUT: %.loc11_26.4: init %i32 = initialize_from %.loc11_26.2 to %.loc11_26.3 [template = constants.%int_42.2] -// CHECK:STDOUT: %impl.elem0.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_26.2: = bound_method %int_42.loc11_24, %impl.elem0.loc11_26.2 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc11_26.2: = specific_function %Convert.bound.loc11_26.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc11_26.2: init %i32 = call %Convert.specific_fn.loc11_26.2(%int_42.loc11_24) [template = constants.%int_42.2] @@ -99,12 +93,10 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %c.ref: ref %array_type = name_ref c, file.%c // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [template = constants.%int_10] // 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: %.loc15_19.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_19.2: type = converted %int.make_type_signed, %.loc15_19.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_19.3: ref %i32 = array_index %c.ref, [template = ] -// CHECK:STDOUT: %.loc15_19.4: %i32 = bind_value %.loc15_19.3 -// CHECK:STDOUT: assign file.%d.var, %.loc15_19.4 +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_19.1: ref %i32 = array_index %c.ref, [template = ] +// CHECK:STDOUT: %.loc15_19.2: %i32 = bind_value %.loc15_19.1 +// CHECK:STDOUT: assign file.%d.var, %.loc15_19.2 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/assoc_const.carbon b/toolchain/check/testdata/interface/assoc_const.carbon index da4a83c36ca0..e8eb8e1a9713 100644 --- a/toolchain/check/testdata/interface/assoc_const.carbon +++ b/toolchain/check/testdata/interface/assoc_const.carbon @@ -21,16 +21,14 @@ interface I { // CHECK:STDOUT: %assoc_type.1: type = assoc_entity_type %I.type, type [template] // CHECK:STDOUT: %assoc0: %assoc_type.1 = assoc_entity element0, @I.%T [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %assoc_type.2: type = assoc_entity_type %I.type, %i32 [template] // CHECK:STDOUT: %assoc1: %assoc_type.2 = assoc_entity element1, @I.%N [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -50,9 +48,7 @@ interface I { // CHECK:STDOUT: %T: type = assoc_const_decl T [template] // CHECK:STDOUT: %assoc0: %assoc_type.1 = assoc_entity element0, %T [template = constants.%assoc0] // 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_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_11.2: type = converted %int.make_type_signed, %.loc13_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %N: %i32 = assoc_const_decl N [template] // CHECK:STDOUT: %assoc1: %assoc_type.2 = assoc_entity element1, %N [template = constants.%assoc1] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon b/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon index 6ceef63cff67..82feeadd1faa 100644 --- a/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon +++ b/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon @@ -25,7 +25,7 @@ interface I { // CHECK:STDOUT: %Self.1: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [template] // CHECK:STDOUT: %assoc_type: type = assoc_entity_type %I.type, type [template] -// CHECK:STDOUT: %assoc0.7: %assoc_type = assoc_entity element0, @I.%T [template] +// CHECK:STDOUT: %assoc0.4: %assoc_type = assoc_entity element0, @I.%T [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -50,7 +50,7 @@ interface I { // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [template = constants.%int_42] // CHECK:STDOUT: %.loc18: type = converted %int_42, [template = ] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %assoc0: %assoc_type = assoc_entity element0, %T [template = constants.%assoc0.7] +// CHECK:STDOUT: %assoc0: %assoc_type = assoc_entity element0, %T [template = constants.%assoc0.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon b/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon index 0a0e15b5f241..9abea6fba37b 100644 --- a/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon +++ b/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon @@ -26,19 +26,17 @@ interface I { // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self.1: %I.type = bind_symbolic_name Self, 0 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [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: %assoc_type.1: type = assoc_entity_type %I.type, type [template] // CHECK:STDOUT: %assoc0.1: %assoc_type.1 = assoc_entity element0, @I.%T [template] // CHECK:STDOUT: %int_42.1: Core.IntLiteral = int_value 42 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_42.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_42.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_42.2: %i32 = int_value 42 [template] // CHECK:STDOUT: %assoc_type.2: type = assoc_entity_type %I.type, %i32 [template] @@ -48,7 +46,7 @@ interface I { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -66,23 +64,17 @@ interface I { // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: %int_32.loc16_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc16_27: init type = call constants.%Int(%int_32.loc16_27) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc16_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc16_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc16_32: init type = call constants.%Int(%int_32.loc16_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_35: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc16_27, %int.make_type_signed.loc16_32) -// CHECK:STDOUT: %.loc16_36.1: type = value_of_initializer %int.make_type_signed.loc16_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_36.2: type = converted %int.make_type_signed.loc16_27, %.loc16_36.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_36.3: type = value_of_initializer %int.make_type_signed.loc16_32 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_36.4: type = converted %int.make_type_signed.loc16_32, %.loc16_36.3 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_36.5: type = converted %.loc16_35, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc16_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc16_35: %tuple.type.1 = tuple_literal (%i32.loc16_27, %i32.loc16_32) +// CHECK:STDOUT: %.loc16_36: type = converted %.loc16_35, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] // CHECK:STDOUT: %assoc0: %assoc_type.1 = assoc_entity element0, %T [template = constants.%assoc0.1] // 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_19.1: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32] -// CHECK:STDOUT: %.loc20_19.2: type = converted %int.make_type_signed.loc20, %.loc20_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [template = constants.%int_42.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_42, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_42) [template = constants.%int_42.2] diff --git a/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon b/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon index 5d2c9cfa52dd..bbaea5efdae1 100644 --- a/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon +++ b/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon @@ -31,9 +31,7 @@ interface Interface { // CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %Interface.type, %F.type [template] // CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @Interface.%F.decl [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %G.assoc_type: type = assoc_entity_type %Interface.type, %G.type [template] @@ -42,7 +40,7 @@ interface Interface { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -70,17 +68,11 @@ interface Interface { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc21_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21_19: init type = call constants.%Int(%int_32.loc21_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_19.1: type = value_of_initializer %int.make_type_signed.loc21_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_19.2: type = converted %int.make_type_signed.loc21_19, %.loc21_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc21_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc21_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21_27: init type = call constants.%Int(%int_32.loc21_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_27.1: type = value_of_initializer %int.make_type_signed.loc21_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_27.2: type = converted %int.make_type_signed.loc21_27, %.loc21_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc21_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc21_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21_35: init type = call constants.%Int(%int_32.loc21_35) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_35.1: type = value_of_initializer %int.make_type_signed.loc21_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_35.2: type = converted %int.make_type_signed.loc21_35, %.loc21_35.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc21_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 diff --git a/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon b/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon index ce4ac90f3eab..3a9d42ceb446 100644 --- a/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon +++ b/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon @@ -73,9 +73,7 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %Interface.type, %F.type [template] // CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, @Interface.%F.decl [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %G.assoc_type: type = assoc_entity_type %Interface.type, %G.type [template] @@ -88,7 +86,7 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -111,17 +109,11 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc31_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc31_19: init type = call constants.%Int(%int_32.loc31_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc31_19.1: type = value_of_initializer %int.make_type_signed.loc31_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc31_19.2: type = converted %int.make_type_signed.loc31_19, %.loc31_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc31_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc31_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc31_27: init type = call constants.%Int(%int_32.loc31_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc31_27.1: type = value_of_initializer %int.make_type_signed.loc31_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc31_27.2: type = converted %int.make_type_signed.loc31_27, %.loc31_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc31_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc31_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc31_35: init type = call constants.%Int(%int_32.loc31_35) [template = constants.%i32] -// CHECK:STDOUT: %.loc31_35.1: type = value_of_initializer %int.make_type_signed.loc31_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc31_35.2: type = converted %int.make_type_signed.loc31_35, %.loc31_35.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc31_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -144,17 +136,11 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc13_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_19: init type = call constants.%Int(%int_32.loc13_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_19.1: type = value_of_initializer %int.make_type_signed.loc13_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_19.2: type = converted %int.make_type_signed.loc13_19, %.loc13_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_27: init type = call constants.%Int(%int_32.loc13_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_27.1: type = value_of_initializer %int.make_type_signed.loc13_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_27.2: type = converted %int.make_type_signed.loc13_27, %.loc13_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc13_35: init type = call constants.%Int(%int_32.loc13_35) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_35.1: type = value_of_initializer %int.make_type_signed.loc13_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_35.2: type = converted %int.make_type_signed.loc13_35, %.loc13_35.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 diff --git a/toolchain/check/testdata/interface/member_lookup.carbon b/toolchain/check/testdata/interface/member_lookup.carbon index 582c0db0f692..97dbba59b830 100644 --- a/toolchain/check/testdata/interface/member_lookup.carbon +++ b/toolchain/check/testdata/interface/member_lookup.carbon @@ -67,15 +67,14 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %I.as_wit.1: = facet_access_witness %I.1 [symbolic] // CHECK:STDOUT: %impl.elem0.1: %T = interface_witness_access %I.as_wit.1, element0 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Interface.type.3: type = facet_type <@Interface, @Interface(%i32)> [template] // CHECK:STDOUT: %I.2: %Interface.type.3 = bind_symbolic_name I, 0 [symbolic] // CHECK:STDOUT: %I.patt.2: %Interface.type.3 = symbolic_binding_pattern I, 0 [symbolic] // CHECK:STDOUT: %AccessConcrete.type: type = fn_type @AccessConcrete [template] // CHECK:STDOUT: %AccessConcrete: %AccessConcrete.type = struct_value () [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %i32 [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32.builtin [template] // CHECK:STDOUT: %assoc_type.2: type = assoc_entity_type %Interface.type.3, %i32 [template] // CHECK:STDOUT: %assoc0.2: %assoc_type.2 = assoc_entity element0, @Interface.%X [template] // CHECK:STDOUT: %I.as_wit.2: = facet_access_witness %I.2 [symbolic] @@ -84,7 +83,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -132,14 +131,10 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %Interface.ref: %Interface.type.1 = name_ref Interface, file.%Interface.decl [template = constants.%Interface.generic] // CHECK:STDOUT: %int_32.loc12_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc12_33: init type = call constants.%Int(%int_32.loc12_33) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_36.1: type = value_of_initializer %int.make_type_signed.loc12_33 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_36.2: type = converted %int.make_type_signed.loc12_33, %.loc12_36.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12_33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %Interface.type: type = facet_type <@Interface, @Interface(constants.%i32)> [template = constants.%Interface.type.3] // CHECK:STDOUT: %int_32.loc12_42: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc12_42: init type = call constants.%Int(%int_32.loc12_42) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_42.1: type = value_of_initializer %int.make_type_signed.loc12_42 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_42.2: type = converted %int.make_type_signed.loc12_42, %.loc12_42.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12_42: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %I.param: %Interface.type.3 = value_param runtime_param // CHECK:STDOUT: %I.loc12_19.1: %Interface.type.3 = bind_symbolic_name I, 0, %I.param [symbolic = %I.loc12_19.2 (constants.%I.2)] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 @@ -253,7 +248,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Interface.type => constants.%Interface.type.3 // CHECK:STDOUT: %Self.2 => constants.%Self -// CHECK:STDOUT: %require_complete => constants.%complete_type +// CHECK:STDOUT: %require_complete => constants.%complete_type.2 // CHECK:STDOUT: %assoc_type => constants.%assoc_type.2 // CHECK:STDOUT: %assoc0.loc5_12.2 => constants.%assoc0.2 // CHECK:STDOUT: } @@ -281,22 +276,21 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %AccessMissingGeneric: %AccessMissingGeneric.type = struct_value () [template] // CHECK:STDOUT: %require_complete.2: = require_complete_type %Interface.type.2 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Interface.type.3: type = facet_type <@Interface, @Interface(%i32)> [template] // CHECK:STDOUT: %I.2: %Interface.type.3 = bind_symbolic_name I, 0 [symbolic] // CHECK:STDOUT: %I.patt.2: %Interface.type.3 = symbolic_binding_pattern I, 0 [symbolic] // CHECK:STDOUT: %AccessMissingConcrete.type: type = fn_type @AccessMissingConcrete [template] // CHECK:STDOUT: %AccessMissingConcrete: %AccessMissingConcrete.type = struct_value () [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %i32 [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32.builtin [template] // CHECK:STDOUT: %assoc_type.2: type = assoc_entity_type %Interface.type.3, %i32 [template] // CHECK:STDOUT: %assoc0.2: %assoc_type.2 = assoc_entity element0, @Interface.%X [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -344,14 +338,10 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %Interface.ref: %Interface.type.1 = name_ref Interface, file.%Interface.decl [template = constants.%Interface.generic] // CHECK:STDOUT: %int_32.loc16_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc16_40: init type = call constants.%Int(%int_32.loc16_40) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_43.1: type = value_of_initializer %int.make_type_signed.loc16_40 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_43.2: type = converted %int.make_type_signed.loc16_40, %.loc16_43.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc16_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %Interface.type: type = facet_type <@Interface, @Interface(constants.%i32)> [template = constants.%Interface.type.3] // CHECK:STDOUT: %int_32.loc16_49: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc16_49: init type = call constants.%Int(%int_32.loc16_49) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_49.1: type = value_of_initializer %int.make_type_signed.loc16_49 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_49.2: type = converted %int.make_type_signed.loc16_49, %.loc16_49.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc16_49: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %I.param: %Interface.type.3 = value_param runtime_param // CHECK:STDOUT: %I.loc16_26.1: %Interface.type.3 = bind_symbolic_name I, 0, %I.param [symbolic = %I.loc16_26.2 (constants.%I.2)] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 @@ -452,7 +442,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Interface.type => constants.%Interface.type.3 // CHECK:STDOUT: %Self.2 => constants.%Self -// CHECK:STDOUT: %require_complete => constants.%complete_type +// CHECK:STDOUT: %require_complete => constants.%complete_type.2 // CHECK:STDOUT: %assoc_type => constants.%assoc_type.2 // CHECK:STDOUT: %assoc0.loc5_12.2 => constants.%assoc0.2 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/todo_define_not_default.carbon b/toolchain/check/testdata/interface/todo_define_not_default.carbon index 97c8f2c913b7..52ab8e46fd30 100644 --- a/toolchain/check/testdata/interface/todo_define_not_default.carbon +++ b/toolchain/check/testdata/interface/todo_define_not_default.carbon @@ -29,9 +29,7 @@ interface I { // CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type %I.type, %F.type [template] // CHECK:STDOUT: %assoc0.1: %F.assoc_type = assoc_entity element0, @I.%F.decl [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %G.assoc_type: type = assoc_entity_type %I.type, %G.type [template] @@ -42,10 +40,10 @@ interface I { // CHECK:STDOUT: %assoc2: %assoc_type.1 = assoc_entity element2, @I.%T [template] // CHECK:STDOUT: %int_42.1: Core.IntLiteral = int_value 42 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_42.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_42.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_42.2: %i32 = int_value 42 [template] // CHECK:STDOUT: %assoc_type.2: type = assoc_entity_type %I.type, %i32 [template] @@ -55,7 +53,7 @@ interface I { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -83,17 +81,11 @@ interface I { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc14_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_11: init type = call constants.%Int(%int_32.loc14_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_11.1: type = value_of_initializer %int.make_type_signed.loc14_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_11.2: type = converted %int.make_type_signed.loc14_11, %.loc14_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc14_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_19: init type = call constants.%Int(%int_32.loc14_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_19.1: type = value_of_initializer %int.make_type_signed.loc14_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_19.2: type = converted %int.make_type_signed.loc14_19, %.loc14_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc14_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_27: init type = call constants.%Int(%int_32.loc14_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_27.1: type = value_of_initializer %int.make_type_signed.loc14_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_27.2: type = converted %int.make_type_signed.loc14_27, %.loc14_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 @@ -103,23 +95,17 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: %assoc1: %G.assoc_type = assoc_entity element1, %G.decl [template = constants.%assoc1] // CHECK:STDOUT: %int_32.loc18_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc18_19: init type = call constants.%Int(%int_32.loc18_19) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc18_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc18_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc18_24: init type = call constants.%Int(%int_32.loc18_24) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_27: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc18_19, %int.make_type_signed.loc18_24) -// CHECK:STDOUT: %.loc18_28.1: type = value_of_initializer %int.make_type_signed.loc18_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_28.2: type = converted %int.make_type_signed.loc18_19, %.loc18_28.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_28.3: type = value_of_initializer %int.make_type_signed.loc18_24 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_28.4: type = converted %int.make_type_signed.loc18_24, %.loc18_28.3 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_28.5: type = converted %.loc18_27, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc18_24: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_27: %tuple.type.1 = tuple_literal (%i32.loc18_19, %i32.loc18_24) +// CHECK:STDOUT: %.loc18_28: type = converted %.loc18_27, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] // CHECK:STDOUT: %assoc2: %assoc_type.1 = assoc_entity element2, %T [template = constants.%assoc2] // 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_11.1: type = value_of_initializer %int.make_type_signed.loc19 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_11.2: type = converted %int.make_type_signed.loc19, %.loc19_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [template = constants.%int_42.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_42, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_42) [template = constants.%int_42.2] diff --git a/toolchain/check/testdata/ir/duplicate_name_same_line.carbon b/toolchain/check/testdata/ir/duplicate_name_same_line.carbon index 19df3cd53b8e..b36f50311d37 100644 --- a/toolchain/check/testdata/ir/duplicate_name_same_line.carbon +++ b/toolchain/check/testdata/ir/duplicate_name_same_line.carbon @@ -17,19 +17,17 @@ fn A() { if (true) { var n: i32 = 1; } if (true) { var n: i32 = 2; } } // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %true: bool = bool_literal true [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } @@ -37,7 +35,7 @@ fn A() { if (true) { var n: i32 = 1; } if (true) { var n: i32 = 2; } } // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -59,13 +57,11 @@ fn A() { if (true) { var n: i32 = 1; } if (true) { var n: i32 = 2; } } // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc11_18: // CHECK:STDOUT: %int_32.loc11_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_29: init type = call constants.%Int(%int_32.loc11_29) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_29.1: type = value_of_initializer %int.make_type_signed.loc11_29 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_29.2: type = converted %int.make_type_signed.loc11_29, %.loc11_29.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_29: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.var.loc11_26: ref %i32 = var n // CHECK:STDOUT: %n.loc11_26: ref %i32 = bind_name n, %n.var.loc11_26 // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc11_36: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_36: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_36: = bound_method %int_1, %impl.elem0.loc11_36 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_36: = specific_function %Convert.bound.loc11_36, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_36: init %i32 = call %Convert.specific_fn.loc11_36(%int_1) [template = constants.%int_1.2] @@ -79,13 +75,11 @@ fn A() { if (true) { var n: i32 = 1; } if (true) { var n: i32 = 2; } } // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc11_48: // CHECK:STDOUT: %int_32.loc11_59: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_59: init type = call constants.%Int(%int_32.loc11_59) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_59.1: type = value_of_initializer %int.make_type_signed.loc11_59 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_59.2: type = converted %int.make_type_signed.loc11_59, %.loc11_59.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_59: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.var.loc11_56: ref %i32 = var n // CHECK:STDOUT: %n.loc11_56: ref %i32 = bind_name n, %n.var.loc11_56 // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc11_66: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_66: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_66: = bound_method %int_2, %impl.elem0.loc11_66 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_66: = specific_function %Convert.bound.loc11_66, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_66: init %i32 = call %Convert.specific_fn.loc11_66(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/let/compile_time_bindings.carbon b/toolchain/check/testdata/let/compile_time_bindings.carbon index 65c530e99cc3..ce3a4607ca2d 100644 --- a/toolchain/check/testdata/let/compile_time_bindings.carbon +++ b/toolchain/check/testdata/let/compile_time_bindings.carbon @@ -536,17 +536,15 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %Zero: %i32 = bind_symbolic_name Zero, 0 [symbolic] @@ -555,7 +553,7 @@ impl i32 as Empty { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -572,9 +570,7 @@ impl i32 as Empty { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -583,11 +579,9 @@ impl i32 as Empty { // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: // 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_14.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_14.2: type = converted %int.make_type_signed.loc5, %.loc5_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [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: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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] @@ -602,23 +596,21 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %true: bool = bool_literal true [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %Zero: %i32 = bind_symbolic_name Zero, 0 [symbolic] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } @@ -626,7 +618,7 @@ impl i32 as Empty { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -643,9 +635,7 @@ impl i32 as Empty { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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_11.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4, %.loc4_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -658,11 +648,9 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: !if.then: // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_16.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_16.2: type = converted %int.make_type_signed.loc6, %.loc6_16.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc6: = bound_method %int_0, %impl.elem0.loc6 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc6: = specific_function %Convert.bound.loc6, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %Convert.specific_fn.loc6(%int_0) [template = constants.%int_0.2] @@ -674,7 +662,7 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: !if.else: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc9: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9: = bound_method %int_1, %impl.elem0.loc9 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc9: = specific_function %Convert.bound.loc9, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %Convert.specific_fn.loc9(%int_1) [template = constants.%int_1.2] @@ -689,9 +677,7 @@ impl i32 as Empty { // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self.1: %I.type = bind_symbolic_name Self, 0 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %assoc_type: type = assoc_entity_type %I.type, type [template] // CHECK:STDOUT: %assoc0.1: %assoc_type = assoc_entity element0, @I.%T [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -703,7 +689,7 @@ impl i32 as Empty { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -721,9 +707,7 @@ impl i32 as Empty { // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // 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: %.loc5_21.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc5_21.2: type = converted %int.make_type_signed, %.loc5_21.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] // CHECK:STDOUT: %assoc0: %assoc_type = assoc_entity element0, %T [template = constants.%assoc0.1] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { @@ -756,18 +740,16 @@ impl i32 as Empty { // CHECK:STDOUT: constants { // CHECK:STDOUT: %I: type = class_type @I [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -784,10 +766,8 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: class @I { // 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: %.loc9_21.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc9_21.2: type = converted %int.make_type_signed, %.loc9_21.1 [template = constants.%i32] -// CHECK:STDOUT: %T: type = bind_name T, %.loc9_21.2 +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %T: type = bind_name T, %i32 // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %return.patt: = return_slot_pattern // CHECK:STDOUT: %return.param_patt: = out_param_pattern %return.patt, runtime_param0 @@ -796,7 +776,7 @@ impl i32 as Empty { // CHECK:STDOUT: %return.param: ref = out_param runtime_param0 // CHECK:STDOUT: %return: ref = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%I @@ -811,16 +791,14 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -848,10 +826,8 @@ impl i32 as Empty { // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // 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: %.loc8_19.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_19.2: type = converted %int.make_type_signed, %.loc8_19.1 [template = constants.%i32] -// CHECK:STDOUT: %T: type = bind_name T, %.loc8_19.2 +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %T: type = bind_name T, %i32 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -861,24 +837,22 @@ impl i32 as Empty { // CHECK:STDOUT: %Empty.type: type = facet_type <@Empty> [template] // CHECK:STDOUT: %Self.1: %Empty.type = bind_symbolic_name Self, 0 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%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.2(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] -// CHECK:STDOUT: %interface.10: = interface_witness () [template] +// CHECK:STDOUT: %interface.6: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -893,9 +867,7 @@ impl i32 as Empty { // CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [template = constants.%Empty.type] {} {} // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_6.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_6.2: type = converted %int.make_type_signed.loc6, %.loc6_6.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [template = constants.%Empty.type] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -908,20 +880,18 @@ impl i32 as Empty { // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: %.loc6_6.2 as %Empty.ref { +// CHECK:STDOUT: impl @impl.1: %i32.loc6 as %Empty.ref { // CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc10: init type = call constants.%Int(%int_32.loc10) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_14.1: type = value_of_initializer %int.make_type_signed.loc10 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_14.2: type = converted %int.make_type_signed.loc10, %.loc10_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc10: type = class_type @Int, @Int(constants.%int_32) [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: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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: %.loc10_21.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] // CHECK:STDOUT: %.loc10_21.2: %i32 = converted %int_0, %.loc10_21.1 [template = constants.%int_0.2] // CHECK:STDOUT: %Zero: %i32 = bind_name Zero, %.loc10_21.2 -// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface.10] +// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Zero = %Zero diff --git a/toolchain/check/testdata/let/convert.carbon b/toolchain/check/testdata/let/convert.carbon index 204a672125d8..e37b5772c502 100644 --- a/toolchain/check/testdata/let/convert.carbon +++ b/toolchain/check/testdata/let/convert.carbon @@ -19,9 +19,7 @@ fn F() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type, type) [template] @@ -31,16 +29,16 @@ fn F() -> i32 { // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, Core.IntLiteral, 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_1.2, %int_2.2, %int_3.2) [template] @@ -49,7 +47,7 @@ fn F() -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -66,9 +64,7 @@ fn F() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -77,40 +73,34 @@ fn F() -> i32 { // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_32.loc12_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc12_11: init type = call constants.%Int(%int_32.loc12_11) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc12_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc12_16: init type = call constants.%Int(%int_32.loc12_16) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc12_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc12_21: init type = call constants.%Int(%int_32.loc12_21) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_24.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc12_11, %int.make_type_signed.loc12_16, %int.make_type_signed.loc12_21) -// CHECK:STDOUT: %.loc12_24.2: type = value_of_initializer %int.make_type_signed.loc12_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_24.3: type = converted %int.make_type_signed.loc12_11, %.loc12_24.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_24.4: type = value_of_initializer %int.make_type_signed.loc12_16 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_24.5: type = converted %int.make_type_signed.loc12_16, %.loc12_24.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_24.6: type = value_of_initializer %int.make_type_signed.loc12_21 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_24.7: type = converted %int.make_type_signed.loc12_21, %.loc12_24.6 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_24.8: type = converted %.loc12_24.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc12_21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_24.1: %tuple.type.1 = tuple_literal (%i32.loc12_11, %i32.loc12_16, %i32.loc12_21) +// CHECK:STDOUT: %.loc12_24.2: type = converted %.loc12_24.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %v.var: ref %tuple.type.2 = var v // CHECK:STDOUT: %v: ref %tuple.type.2 = bind_name v, %v.var // CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc12_36.1: %tuple.type.3 = tuple_literal (%int_1.loc12, %int_2, %int_3) -// CHECK:STDOUT: %impl.elem0.loc12_36.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_36.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_36.1: = bound_method %int_1.loc12, %impl.elem0.loc12_36.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc12_36.1: = specific_function %Convert.bound.loc12_36.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc12_36.1: init %i32 = call %Convert.specific_fn.loc12_36.1(%int_1.loc12) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc12_36.2: init %i32 = converted %int_1.loc12, %int.convert_checked.loc12_36.1 [template = constants.%int_1.2] // CHECK:STDOUT: %tuple.elem0.loc12: ref %i32 = tuple_access %v.var, element0 // CHECK:STDOUT: %.loc12_36.3: init %i32 = initialize_from %.loc12_36.2 to %tuple.elem0.loc12 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc12_36.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_36.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_36.2: = bound_method %int_2, %impl.elem0.loc12_36.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc12_36.2: = specific_function %Convert.bound.loc12_36.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc12_36.2: init %i32 = call %Convert.specific_fn.loc12_36.2(%int_2) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc12_36.4: init %i32 = converted %int_2, %int.convert_checked.loc12_36.2 [template = constants.%int_2.2] // CHECK:STDOUT: %tuple.elem1.loc12: ref %i32 = tuple_access %v.var, element1 // CHECK:STDOUT: %.loc12_36.5: init %i32 = initialize_from %.loc12_36.4 to %tuple.elem1.loc12 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc12_36.3: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12_36.3: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_36.3: = bound_method %int_3, %impl.elem0.loc12_36.3 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc12_36.3: = specific_function %Convert.bound.loc12_36.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc12_36.3: init %i32 = call %Convert.specific_fn.loc12_36.3(%int_3) [template = constants.%int_3.2] @@ -121,19 +111,13 @@ fn F() -> i32 { // CHECK:STDOUT: %.loc12_37: init %tuple.type.2 = converted %.loc12_36.1, %.loc12_36.8 [template = constants.%tuple] // CHECK:STDOUT: assign %v.var, %.loc12_37 // CHECK:STDOUT: %int_32.loc14_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_11: init type = call constants.%Int(%int_32.loc14_11) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc14_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_16: init type = call constants.%Int(%int_32.loc14_16) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc14_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_21: init type = call constants.%Int(%int_32.loc14_21) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_24.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc14_11, %int.make_type_signed.loc14_16, %int.make_type_signed.loc14_21) -// CHECK:STDOUT: %.loc14_24.2: type = value_of_initializer %int.make_type_signed.loc14_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_24.3: type = converted %int.make_type_signed.loc14_11, %.loc14_24.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_24.4: type = value_of_initializer %int.make_type_signed.loc14_16 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_24.5: type = converted %int.make_type_signed.loc14_16, %.loc14_24.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_24.6: type = value_of_initializer %int.make_type_signed.loc14_21 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_24.7: type = converted %int.make_type_signed.loc14_21, %.loc14_24.6 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_24.8: type = converted %.loc14_24.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc14_21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_24.1: %tuple.type.1 = tuple_literal (%i32.loc14_11, %i32.loc14_16, %i32.loc14_21) +// CHECK:STDOUT: %.loc14_24.2: type = converted %.loc14_24.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %v.ref: ref %tuple.type.2 = name_ref v, %v // CHECK:STDOUT: %tuple.elem0.loc14: ref %i32 = tuple_access %v.ref, element0 // CHECK:STDOUT: %.loc14_28.1: %i32 = bind_value %tuple.elem0.loc14 diff --git a/toolchain/check/testdata/let/fail_duplicate_decl.carbon b/toolchain/check/testdata/let/fail_duplicate_decl.carbon index 9da615b4f056..358e9ed7ee30 100644 --- a/toolchain/check/testdata/let/fail_duplicate_decl.carbon +++ b/toolchain/check/testdata/let/fail_duplicate_decl.carbon @@ -25,19 +25,17 @@ fn F() { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } @@ -45,7 +43,7 @@ fn F() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -63,11 +61,9 @@ fn F() { // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // 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: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12: = bound_method %int_1, %impl.elem0.loc12 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc12: = specific_function %Convert.bound.loc12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %Convert.specific_fn.loc12(%int_1) [template = constants.%int_1.2] @@ -75,11 +71,9 @@ fn F() { // CHECK:STDOUT: %.loc12_17.2: %i32 = converted %int_1, %.loc12_17.1 [template = constants.%int_1.2] // CHECK:STDOUT: %a.loc12: %i32 = bind_name a, %.loc12_17.2 // 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_10.1: type = value_of_initializer %int.make_type_signed.loc19 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_10.2: type = converted %int.make_type_signed.loc19, %.loc19_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc19: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc19: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc19: = bound_method %int_2, %impl.elem0.loc19 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc19: = specific_function %Convert.bound.loc19, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %Convert.specific_fn.loc19(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/let/fail_generic.carbon b/toolchain/check/testdata/let/fail_generic.carbon index 15f6673b9f63..f4929b1f3531 100644 --- a/toolchain/check/testdata/let/fail_generic.carbon +++ b/toolchain/check/testdata/let/fail_generic.carbon @@ -32,9 +32,7 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] @@ -44,7 +42,7 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -63,13 +61,9 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc12_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc12_9: init type = call constants.%Int(%int_32.loc12_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_9.1: type = value_of_initializer %int.make_type_signed.loc12_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_9.2: type = converted %int.make_type_signed.loc12_9, %.loc12_9.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc12_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc12_17: init type = call constants.%Int(%int_32.loc12_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_17.1: type = value_of_initializer %int.make_type_signed.loc12_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_17.2: type = converted %int.make_type_signed.loc12_17, %.loc12_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -80,10 +74,8 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: fn @F(%a.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: // 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_21.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_21.2: type = converted %int.make_type_signed.loc13, %.loc13_21.1 [template = constants.%i32] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0, %.loc13_21.2 [symbolic = constants.%T] +// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0, %i32.loc13 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref: type = name_ref T, %T [symbolic = constants.%T] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5] // CHECK:STDOUT: %.loc21: %T = converted %int_5, [template = ] diff --git a/toolchain/check/testdata/let/fail_generic_import.carbon b/toolchain/check/testdata/let/fail_generic_import.carbon index 48966f1972ad..4fb47a044098 100644 --- a/toolchain/check/testdata/let/fail_generic_import.carbon +++ b/toolchain/check/testdata/let/fail_generic_import.carbon @@ -32,14 +32,12 @@ let a: T = 0; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -56,10 +54,8 @@ let a: T = 0; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // 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: %.loc8_19.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_19.2: type = converted %int.make_type_signed, %.loc8_19.1 [template = constants.%i32] -// CHECK:STDOUT: %T: type = bind_name T, %.loc8_19.2 +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %T: type = bind_name T, %i32 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/let/fail_missing_value.carbon b/toolchain/check/testdata/let/fail_missing_value.carbon index d8d71ba5d554..c66ed6d5179f 100644 --- a/toolchain/check/testdata/let/fail_missing_value.carbon +++ b/toolchain/check/testdata/let/fail_missing_value.carbon @@ -25,16 +25,14 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -48,9 +46,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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: %.loc15_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_signed, %.loc15_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n: %i32 = bind_name n, // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} // CHECK:STDOUT: } @@ -58,9 +54,7 @@ fn F() { // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // 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: %.loc21_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc21_10.2: type = converted %int.make_type_signed, %.loc21_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n: %i32 = bind_name n, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/let/fail_modifiers.carbon b/toolchain/check/testdata/let/fail_modifiers.carbon index b897207a54e3..0d6c751f4d8b 100644 --- a/toolchain/check/testdata/let/fail_modifiers.carbon +++ b/toolchain/check/testdata/let/fail_modifiers.carbon @@ -87,15 +87,13 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } @@ -103,7 +101,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -123,43 +121,27 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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_18.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_18.2: type = converted %int.make_type_signed.loc15, %.loc15_18.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_16.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_16.2: type = converted %int.make_type_signed.loc21, %.loc21_16.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc27: init type = call constants.%Int(%int_32.loc27) [template = constants.%i32] -// CHECK:STDOUT: %.loc27_14.1: type = value_of_initializer %int.make_type_signed.loc27 [template = constants.%i32] -// CHECK:STDOUT: %.loc27_14.2: type = converted %int.make_type_signed.loc27, %.loc27_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc33: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc33: init type = call constants.%Int(%int_32.loc33) [template = constants.%i32] -// CHECK:STDOUT: %.loc33_16.1: type = value_of_initializer %int.make_type_signed.loc33 [template = constants.%i32] -// CHECK:STDOUT: %.loc33_16.2: type = converted %int.make_type_signed.loc33, %.loc33_16.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc46: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc46: init type = call constants.%Int(%int_32.loc46) [template = constants.%i32] -// CHECK:STDOUT: %.loc46_22.1: type = value_of_initializer %int.make_type_signed.loc46 [template = constants.%i32] -// CHECK:STDOUT: %.loc46_22.2: type = converted %int.make_type_signed.loc46, %.loc46_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc46: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc59: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc59: init type = call constants.%Int(%int_32.loc59) [template = constants.%i32] -// CHECK:STDOUT: %.loc59_24.1: type = value_of_initializer %int.make_type_signed.loc59 [template = constants.%i32] -// CHECK:STDOUT: %.loc59_24.2: type = converted %int.make_type_signed.loc59, %.loc59_24.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc59: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc72: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc72: init type = call constants.%Int(%int_32.loc72) [template = constants.%i32] -// CHECK:STDOUT: %.loc72_26.1: type = value_of_initializer %int.make_type_signed.loc72 [template = constants.%i32] -// CHECK:STDOUT: %.loc72_26.2: type = converted %int.make_type_signed.loc72, %.loc72_26.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc72: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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_28.1: type = value_of_initializer %int.make_type_signed.loc84 [template = constants.%i32] -// CHECK:STDOUT: %.loc84_28.2: type = converted %int.make_type_signed.loc84, %.loc84_28.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc84: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc15: = bound_method %int_1.loc15, %impl.elem0.loc15 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc15: = specific_function %Convert.bound.loc15, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %Convert.specific_fn.loc15(%int_1.loc15) [template = constants.%int_1.2] @@ -167,7 +149,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %.loc15_25.2: %i32 = converted %int_1.loc15, %.loc15_25.1 [template = constants.%int_1.2] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc15_25.2 // CHECK:STDOUT: %int_1.loc21: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc21: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc21: = bound_method %int_1.loc21, %impl.elem0.loc21 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc21: = specific_function %Convert.bound.loc21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %Convert.specific_fn.loc21(%int_1.loc21) [template = constants.%int_1.2] @@ -175,7 +157,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %.loc21_23.2: %i32 = converted %int_1.loc21, %.loc21_23.1 [template = constants.%int_1.2] // CHECK:STDOUT: %c: %i32 = bind_name c, %.loc21_23.2 // CHECK:STDOUT: %int_1.loc27: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc27: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc27: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc27: = bound_method %int_1.loc27, %impl.elem0.loc27 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc27: = specific_function %Convert.bound.loc27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc27: init %i32 = call %Convert.specific_fn.loc27(%int_1.loc27) [template = constants.%int_1.2] @@ -183,7 +165,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %.loc27_21.2: %i32 = converted %int_1.loc27, %.loc27_21.1 [template = constants.%int_1.2] // CHECK:STDOUT: %d: %i32 = bind_name d, %.loc27_21.2 // CHECK:STDOUT: %int_1.loc33: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc33: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc33: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc33: = bound_method %int_1.loc33, %impl.elem0.loc33 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc33: = specific_function %Convert.bound.loc33, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc33: init %i32 = call %Convert.specific_fn.loc33(%int_1.loc33) [template = constants.%int_1.2] @@ -191,7 +173,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %.loc33_23.2: %i32 = converted %int_1.loc33, %.loc33_23.1 [template = constants.%int_1.2] // CHECK:STDOUT: %e: %i32 = bind_name e, %.loc33_23.2 // CHECK:STDOUT: %int_1.loc46: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc46: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc46: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc46: = bound_method %int_1.loc46, %impl.elem0.loc46 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc46: = specific_function %Convert.bound.loc46, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc46: init %i32 = call %Convert.specific_fn.loc46(%int_1.loc46) [template = constants.%int_1.2] @@ -199,7 +181,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %.loc46_29.2: %i32 = converted %int_1.loc46, %.loc46_29.1 [template = constants.%int_1.2] // CHECK:STDOUT: %f: %i32 = bind_name f, %.loc46_29.2 // CHECK:STDOUT: %int_1.loc59: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc59: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc59: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc59: = bound_method %int_1.loc59, %impl.elem0.loc59 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc59: = specific_function %Convert.bound.loc59, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc59: init %i32 = call %Convert.specific_fn.loc59(%int_1.loc59) [template = constants.%int_1.2] @@ -207,7 +189,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %.loc59_31.2: %i32 = converted %int_1.loc59, %.loc59_31.1 [template = constants.%int_1.2] // CHECK:STDOUT: %g: %i32 = bind_name g, %.loc59_31.2 // CHECK:STDOUT: %int_1.loc72: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc72: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc72: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc72: = bound_method %int_1.loc72, %impl.elem0.loc72 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc72: = specific_function %Convert.bound.loc72, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc72: init %i32 = call %Convert.specific_fn.loc72(%int_1.loc72) [template = constants.%int_1.2] @@ -215,7 +197,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %.loc72_33.2: %i32 = converted %int_1.loc72, %.loc72_33.1 [template = constants.%int_1.2] // CHECK:STDOUT: %h: %i32 = bind_name h, %.loc72_33.2 // CHECK:STDOUT: %int_1.loc84: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc84: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc84: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc84: = bound_method %int_1.loc84, %impl.elem0.loc84 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc84: = specific_function %Convert.bound.loc84, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc84: init %i32 = call %Convert.specific_fn.loc84(%int_1.loc84) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/let/fail_use_in_init.carbon b/toolchain/check/testdata/let/fail_use_in_init.carbon index 9621da627dc5..0d3624683580 100644 --- a/toolchain/check/testdata/let/fail_use_in_init.carbon +++ b/toolchain/check/testdata/let/fail_use_in_init.carbon @@ -21,14 +21,12 @@ fn F() { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -46,9 +44,7 @@ fn F() { // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // 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: %.loc15_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_10.2: type = converted %int.make_type_signed, %.loc15_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.ref: = name_ref a, [template = ] // CHECK:STDOUT: %a: %i32 = bind_name a, // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/let/generic.carbon b/toolchain/check/testdata/let/generic.carbon index 1e558014d70d..630faff440d1 100644 --- a/toolchain/check/testdata/let/generic.carbon +++ b/toolchain/check/testdata/let/generic.carbon @@ -20,16 +20,14 @@ fn F() { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -47,10 +45,8 @@ fn F() { // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // 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: %.loc12_21.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_21.2: type = converted %int.make_type_signed, %.loc12_21.1 [template = constants.%i32] -// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0, %.loc12_21.2 [symbolic = constants.%T] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0, %i32 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref.loc13: type = name_ref T, %T [symbolic = constants.%T] // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic = constants.%ptr] // CHECK:STDOUT: %p.var: ref %ptr = var p diff --git a/toolchain/check/testdata/let/generic_import.carbon b/toolchain/check/testdata/let/generic_import.carbon index 838c6909ffd8..158f87222580 100644 --- a/toolchain/check/testdata/let/generic_import.carbon +++ b/toolchain/check/testdata/let/generic_import.carbon @@ -36,14 +36,12 @@ var b: T = *a; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -60,10 +58,8 @@ var b: T = *a; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // 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: %.loc8_19.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_19.2: type = converted %int.make_type_signed, %.loc8_19.1 [template = constants.%i32] -// CHECK:STDOUT: %T: type = bind_name T, %.loc8_19.2 +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %T: type = bind_name T, %i32 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/let/global.carbon b/toolchain/check/testdata/let/global.carbon index 52b1622af770..8dc64d81de61 100644 --- a/toolchain/check/testdata/let/global.carbon +++ b/toolchain/check/testdata/let/global.carbon @@ -16,15 +16,13 @@ fn F() -> i32 { return n; } // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -34,7 +32,7 @@ fn F() -> i32 { return n; } // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -48,17 +46,13 @@ fn F() -> i32 { return n; } // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_8.2: type = converted %int.make_type_signed, %.loc11_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // 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: %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_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_11.2: type = converted %int.make_type_signed, %.loc13_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -73,7 +67,7 @@ fn F() -> i32 { return n; } // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/let/local.carbon b/toolchain/check/testdata/let/local.carbon index 72ef42b3daf5..f223b422a9f9 100644 --- a/toolchain/check/testdata/let/local.carbon +++ b/toolchain/check/testdata/let/local.carbon @@ -17,16 +17,14 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -45,13 +43,9 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%int_32.loc11_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed.loc11_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed.loc11_9, %.loc11_9.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_17: init type = call constants.%Int(%int_32.loc11_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.1: type = value_of_initializer %int.make_type_signed.loc11_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.2: type = converted %int.make_type_signed.loc11_17, %.loc11_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -62,9 +56,7 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: fn @F(%a.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: // 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: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b: %i32 = bind_name b, %a.ref // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b diff --git a/toolchain/check/testdata/let/shadowed_decl.carbon b/toolchain/check/testdata/let/shadowed_decl.carbon index ef8d27a4b693..79352f85fef7 100644 --- a/toolchain/check/testdata/let/shadowed_decl.carbon +++ b/toolchain/check/testdata/let/shadowed_decl.carbon @@ -18,17 +18,15 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } @@ -36,7 +34,7 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -55,13 +53,9 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%int_32.loc11_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_signed.loc11_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_signed.loc11_9, %.loc11_9.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_17: init type = call constants.%Int(%int_32.loc11_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.1: type = value_of_initializer %int.make_type_signed.loc11_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.2: type = converted %int.make_type_signed.loc11_17, %.loc11_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %a.loc11: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -72,11 +66,9 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: fn @F(%a.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: // 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: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/namespace/add_to_import.carbon b/toolchain/check/testdata/namespace/add_to_import.carbon index cf9853baa893..de1aa87e438c 100644 --- a/toolchain/check/testdata/namespace/add_to_import.carbon +++ b/toolchain/check/testdata/namespace/add_to_import.carbon @@ -44,17 +44,15 @@ var a: i32 = NS.A(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -66,7 +64,7 @@ var a: i32 = NS.A(); // CHECK:STDOUT: } // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.2 -// CHECK:STDOUT: .ImplicitAs = %import_ref.3 +// CHECK:STDOUT: .ImplicitAs = %import_ref.6 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -86,16 +84,12 @@ var a: i32 = NS.A(); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_14.2: type = converted %int.make_type_signed, %.loc4_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [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: %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: %.loc6_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_signed, %.loc6_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: } @@ -103,7 +97,7 @@ var a: i32 = NS.A(); // CHECK:STDOUT: fn @A() -> %i32 { // CHECK:STDOUT: !entry: // 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: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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] diff --git a/toolchain/check/testdata/namespace/alias.carbon b/toolchain/check/testdata/namespace/alias.carbon index 8a45f378e1ca..a4d4b3871c8a 100644 --- a/toolchain/check/testdata/namespace/alias.carbon +++ b/toolchain/check/testdata/namespace/alias.carbon @@ -24,17 +24,15 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %A.type: type = fn_type @A [template] // CHECK:STDOUT: %A: %A.type = struct_value () [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] @@ -46,7 +44,7 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -72,9 +70,7 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc15_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_14.2: type = converted %int.make_type_signed, %.loc15_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -83,9 +79,7 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc17_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc17_11.2: type = converted %int.make_type_signed, %.loc17_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -97,9 +91,7 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc21_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc21_11.2: type = converted %int.make_type_signed, %.loc21_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -108,7 +100,7 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: fn @A() -> %i32 { // CHECK:STDOUT: !entry: // 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: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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] diff --git a/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon b/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon index 792b21c69d61..cd75ed6c4d98 100644 --- a/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon +++ b/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon @@ -25,17 +25,15 @@ fn ns.A() -> i32 { return 0; } // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] // CHECK:STDOUT: %.1: %.type = struct_value () [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -43,7 +41,7 @@ fn ns.A() -> i32 { return 0; } // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -64,9 +62,7 @@ fn ns.A() -> i32 { return 0; } // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc22_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc22_14.2: type = converted %int.make_type_signed, %.loc22_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -75,7 +71,7 @@ fn ns.A() -> i32 { return 0; } // CHECK:STDOUT: fn @.1() -> %i32 { // CHECK:STDOUT: !entry: // 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: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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] diff --git a/toolchain/check/testdata/namespace/fail_params.carbon b/toolchain/check/testdata/namespace/fail_params.carbon index 5bb7936c9844..f3e28d07db72 100644 --- a/toolchain/check/testdata/namespace/fail_params.carbon +++ b/toolchain/check/testdata/namespace/fail_params.carbon @@ -44,9 +44,7 @@ fn D(T:! type).F() {} // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1 [template] @@ -55,7 +53,7 @@ fn D(T:! type).F() {} // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -75,9 +73,7 @@ fn D(T:! type).F() {} // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} // 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: %.loc24_16.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc24_16.2: type = converted %int.make_type_signed, %.loc24_16.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %B: = namespace [template] {} diff --git a/toolchain/check/testdata/namespace/shadow.carbon b/toolchain/check/testdata/namespace/shadow.carbon index ad6f48dfacec..cfdbc63cb028 100644 --- a/toolchain/check/testdata/namespace/shadow.carbon +++ b/toolchain/check/testdata/namespace/shadow.carbon @@ -36,18 +36,16 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: %A.type.2: type = fn_type @A.2 [template] // CHECK:STDOUT: %A.2: %A.type.2 = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %true: bool = bool_literal true [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -55,7 +53,7 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -82,9 +80,7 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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_15.1: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_15.2: type = converted %int.make_type_signed.loc18, %.loc18_15.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -103,25 +99,23 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.then: // 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_12.1: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] -// CHECK:STDOUT: %.loc22_12.2: type = converted %int.make_type_signed.loc22, %.loc22_12.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %A.var: ref %i32 = var A // CHECK:STDOUT: %A: ref %i32 = bind_name A, %A.var // CHECK:STDOUT: %int_0.loc22: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc22: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc22: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc22: = bound_method %int_0.loc22, %impl.elem0.loc22 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc22: = specific_function %Convert.bound.loc22, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc22: init %i32 = call %Convert.specific_fn.loc22(%int_0.loc22) [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc22_19: init %i32 = converted %int_0.loc22, %int.convert_checked.loc22 [template = constants.%int_0.2] -// CHECK:STDOUT: assign %A.var, %.loc22_19 +// CHECK:STDOUT: %.loc22: init %i32 = converted %int_0.loc22, %int.convert_checked.loc22 [template = constants.%int_0.2] +// CHECK:STDOUT: assign %A.var, %.loc22 // CHECK:STDOUT: %A.ref.loc25: ref %i32 = name_ref A, %A // CHECK:STDOUT: %.loc25: %i32 = bind_value %A.ref.loc25 // CHECK:STDOUT: return %.loc25 // CHECK:STDOUT: // CHECK:STDOUT: !if.else: // CHECK:STDOUT: %int_0.loc27: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc27: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc27: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc27: = bound_method %int_0.loc27, %impl.elem0.loc27 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc27: = specific_function %Convert.bound.loc27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc27: init %i32 = call %Convert.specific_fn.loc27(%int_0.loc27) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/operators/builtin/assignment.carbon b/toolchain/check/testdata/operators/builtin/assignment.carbon index 1d46afbf9268..f2c05f532719 100644 --- a/toolchain/check/testdata/operators/builtin/assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/assignment.carbon @@ -32,19 +32,17 @@ fn Main() { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] // CHECK:STDOUT: %int_9.1: Core.IntLiteral = int_value 9 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_9.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_9.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_9.2: %i32 = int_value 9 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] @@ -52,20 +50,20 @@ fn Main() { // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [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: %int_3.1: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.5: = specific_function %Convert.bound.5, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %Convert.bound.6: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.6: = bound_method %int_4.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.6: = specific_function %Convert.bound.6, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template] @@ -73,12 +71,12 @@ fn Main() { // CHECK:STDOUT: %struct: %struct_type.a.b.1 = struct_value (%int_1.2, %int_2.2) [template] // CHECK:STDOUT: %ptr.3: type = ptr_type %i32 [template] // CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] -// CHECK:STDOUT: %Convert.bound.7: = bound_method %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.7: = bound_method %int_5.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.7: = specific_function %Convert.bound.7, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] // CHECK:STDOUT: %true: bool = bool_literal true [template] // CHECK:STDOUT: %int_10.1: Core.IntLiteral = int_value 10 [template] -// CHECK:STDOUT: %Convert.bound.8: = bound_method %int_10.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.8: = bound_method %int_10.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.8: = specific_function %Convert.bound.8, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_10.2: %i32 = int_value 10 [template] // CHECK:STDOUT: } @@ -86,7 +84,7 @@ fn Main() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -104,49 +102,43 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // 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: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] -// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12: = bound_method %int_12, %impl.elem0.loc12 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc12: = specific_function %Convert.bound.loc12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %Convert.specific_fn.loc12(%int_12) [template = constants.%int_12.2] -// CHECK:STDOUT: %.loc12_18: init %i32 = converted %int_12, %int.convert_checked.loc12 [template = constants.%int_12.2] -// CHECK:STDOUT: assign %a.var, %.loc12_18 +// CHECK:STDOUT: %.loc12: init %i32 = converted %int_12, %int.convert_checked.loc12 [template = constants.%int_12.2] +// CHECK:STDOUT: assign %a.var, %.loc12 // CHECK:STDOUT: %a.ref.loc13: ref %i32 = name_ref a, %a // CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [template = constants.%int_9.1] -// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13: = bound_method %int_9, %impl.elem0.loc13 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc13: = specific_function %Convert.bound.loc13, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %Convert.specific_fn.loc13(%int_9) [template = constants.%int_9.2] // CHECK:STDOUT: %.loc13: init %i32 = converted %int_9, %int.convert_checked.loc13 [template = constants.%int_9.2] // CHECK:STDOUT: assign %a.ref.loc13, %.loc13 // CHECK:STDOUT: %int_32.loc15_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc15_11: init type = call constants.%Int(%int_32.loc15_11) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc15_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc15_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc15_16: init type = call constants.%Int(%int_32.loc15_16) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_19.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc15_11, %int.make_type_signed.loc15_16) -// CHECK:STDOUT: %.loc15_19.2: type = value_of_initializer %int.make_type_signed.loc15_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_19.3: type = converted %int.make_type_signed.loc15_11, %.loc15_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_19.4: type = value_of_initializer %int.make_type_signed.loc15_16 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_19.5: type = converted %int.make_type_signed.loc15_16, %.loc15_19.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_19.6: type = converted %.loc15_19.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc15_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_19.1: %tuple.type.1 = tuple_literal (%i32.loc15_11, %i32.loc15_16) +// CHECK:STDOUT: %.loc15_19.2: type = converted %.loc15_19.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %b.var: ref %tuple.type.2 = var b // CHECK:STDOUT: %b: ref %tuple.type.2 = bind_name b, %b.var // CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc15: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc15_28.1: %tuple.type.3 = tuple_literal (%int_1.loc15, %int_2.loc15) -// CHECK:STDOUT: %impl.elem0.loc15_28.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc15_28.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc15_28.1: = bound_method %int_1.loc15, %impl.elem0.loc15_28.1 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc15_28.1: = specific_function %Convert.bound.loc15_28.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc15_28.1: init %i32 = call %Convert.specific_fn.loc15_28.1(%int_1.loc15) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc15_28.2: init %i32 = converted %int_1.loc15, %int.convert_checked.loc15_28.1 [template = constants.%int_1.2] // CHECK:STDOUT: %tuple.elem0.loc15: ref %i32 = tuple_access %b.var, element0 // CHECK:STDOUT: %.loc15_28.3: init %i32 = initialize_from %.loc15_28.2 to %tuple.elem0.loc15 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc15_28.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc15_28.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc15_28.2: = bound_method %int_2.loc15, %impl.elem0.loc15_28.2 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc15_28.2: = specific_function %Convert.bound.loc15_28.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc15_28.2: init %i32 = call %Convert.specific_fn.loc15_28.2(%int_2.loc15) [template = constants.%int_2.2] @@ -160,7 +152,7 @@ fn Main() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %tuple.elem0.loc16: ref %i32 = tuple_access %b.ref.loc16, element0 // CHECK:STDOUT: %int_3.loc16: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %impl.elem0.loc16: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc16: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc16: = bound_method %int_3.loc16, %impl.elem0.loc16 [template = constants.%Convert.bound.5] // CHECK:STDOUT: %Convert.specific_fn.loc16: = specific_function %Convert.bound.loc16, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.5] // CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %Convert.specific_fn.loc16(%int_3.loc16) [template = constants.%int_3.2] @@ -170,34 +162,30 @@ fn Main() { // CHECK:STDOUT: %int_1.loc17: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %tuple.elem1.loc17: ref %i32 = tuple_access %b.ref.loc17, element1 // CHECK:STDOUT: %int_4.loc17: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] -// CHECK:STDOUT: %impl.elem0.loc17: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc17: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc17: = bound_method %int_4.loc17, %impl.elem0.loc17 [template = constants.%Convert.bound.6] // CHECK:STDOUT: %Convert.specific_fn.loc17: = specific_function %Convert.bound.loc17, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.6] // CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %Convert.specific_fn.loc17(%int_4.loc17) [template = constants.%int_4.2] // CHECK:STDOUT: %.loc17: init %i32 = converted %int_4.loc17, %int.convert_checked.loc17 [template = constants.%int_4.2] // CHECK:STDOUT: assign %tuple.elem1.loc17, %.loc17 // CHECK:STDOUT: %int_32.loc19_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc19_15: init type = call constants.%Int(%int_32.loc19_15) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_15.1: type = value_of_initializer %int.make_type_signed.loc19_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_15.2: type = converted %int.make_type_signed.loc19_15, %.loc19_15.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc19_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc19_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc19_24: init type = call constants.%Int(%int_32.loc19_24) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_24.1: type = value_of_initializer %int.make_type_signed.loc19_24 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_24.2: type = converted %int.make_type_signed.loc19_24, %.loc19_24.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc19_24: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1] // CHECK:STDOUT: %c.var: ref %struct_type.a.b.1 = var c // CHECK:STDOUT: %c: ref %struct_type.a.b.1 = bind_name c, %c.var // CHECK:STDOUT: %int_1.loc19: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc19: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc19_46.1: %struct_type.a.b.2 = struct_literal (%int_1.loc19, %int_2.loc19) -// CHECK:STDOUT: %impl.elem0.loc19_46.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc19_46.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc19_46.1: = bound_method %int_1.loc19, %impl.elem0.loc19_46.1 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc19_46.1: = specific_function %Convert.bound.loc19_46.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc19_46.1: init %i32 = call %Convert.specific_fn.loc19_46.1(%int_1.loc19) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc19_46.2: init %i32 = converted %int_1.loc19, %int.convert_checked.loc19_46.1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc19_46.3: ref %i32 = struct_access %c.var, element0 // CHECK:STDOUT: %.loc19_46.4: init %i32 = initialize_from %.loc19_46.2 to %.loc19_46.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc19_46.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc19_46.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc19_46.2: = bound_method %int_2.loc19, %impl.elem0.loc19_46.2 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc19_46.2: = specific_function %Convert.bound.loc19_46.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc19_46.2: init %i32 = call %Convert.specific_fn.loc19_46.2(%int_2.loc19) [template = constants.%int_2.2] @@ -210,7 +198,7 @@ fn Main() { // CHECK:STDOUT: %c.ref.loc20: ref %struct_type.a.b.1 = name_ref c, %c // CHECK:STDOUT: %.loc20_4: ref %i32 = struct_access %c.ref.loc20, element0 // CHECK:STDOUT: %int_3.loc20: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %impl.elem0.loc20: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc20: = bound_method %int_3.loc20, %impl.elem0.loc20 [template = constants.%Convert.bound.5] // CHECK:STDOUT: %Convert.specific_fn.loc20: = specific_function %Convert.bound.loc20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.5] // CHECK:STDOUT: %int.convert_checked.loc20: init %i32 = call %Convert.specific_fn.loc20(%int_3.loc20) [template = constants.%int_3.2] @@ -219,16 +207,14 @@ fn Main() { // CHECK:STDOUT: %c.ref.loc21: ref %struct_type.a.b.1 = name_ref c, %c // CHECK:STDOUT: %.loc21_4: ref %i32 = struct_access %c.ref.loc21, element1 // CHECK:STDOUT: %int_4.loc21: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] -// CHECK:STDOUT: %impl.elem0.loc21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc21: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc21: = bound_method %int_4.loc21, %impl.elem0.loc21 [template = constants.%Convert.bound.6] // CHECK:STDOUT: %Convert.specific_fn.loc21: = specific_function %Convert.bound.loc21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.6] // CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %Convert.specific_fn.loc21(%int_4.loc21) [template = constants.%int_4.2] // CHECK:STDOUT: %.loc21_7: init %i32 = converted %int_4.loc21, %int.convert_checked.loc21 [template = constants.%int_4.2] // CHECK:STDOUT: assign %.loc21_4, %.loc21_7 // CHECK:STDOUT: %int_32.loc23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc23: init type = call constants.%Int(%int_32.loc23) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_13.1: type = value_of_initializer %int.make_type_signed.loc23 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_13.2: type = converted %int.make_type_signed.loc23, %.loc23_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr.3] // CHECK:STDOUT: %p.var: ref %ptr.3 = var p // CHECK:STDOUT: %p: ref %ptr.3 = bind_name p, %p.var @@ -239,7 +225,7 @@ fn Main() { // CHECK:STDOUT: %.loc24_4: %ptr.3 = bind_value %p.ref.loc24 // CHECK:STDOUT: %.loc24_3: ref %i32 = deref %.loc24_4 // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] -// CHECK:STDOUT: %impl.elem0.loc24: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc24: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc24: = bound_method %int_5, %impl.elem0.loc24 [template = constants.%Convert.bound.7] // CHECK:STDOUT: %Convert.specific_fn.loc24: = specific_function %Convert.bound.loc24, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.7] // CHECK:STDOUT: %int.convert_checked.loc24: init %i32 = call %Convert.specific_fn.loc24(%int_5) [template = constants.%int_5.2] @@ -262,7 +248,7 @@ fn Main() { // CHECK:STDOUT: %.loc26_5: %ptr.3 = block_arg !if.expr.result // CHECK:STDOUT: %.loc26_3: ref %i32 = deref %.loc26_5 // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [template = constants.%int_10.1] -// CHECK:STDOUT: %impl.elem0.loc26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc26: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc26: = bound_method %int_10, %impl.elem0.loc26 [template = constants.%Convert.bound.8] // CHECK:STDOUT: %Convert.specific_fn.loc26: = specific_function %Convert.bound.loc26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.8] // CHECK:STDOUT: %int.convert_checked.loc26: init %i32 = call %Convert.specific_fn.loc26(%int_10) [template = constants.%int_10.2] diff --git a/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon b/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon index ae935e0852f8..f04d66dcdb0d 100644 --- a/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon @@ -45,9 +45,7 @@ var or_: F(true or true); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] @@ -58,8 +56,8 @@ var or_: F(true or true); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { -// CHECK:STDOUT: %.loc42_17: bool = block_arg [template = constants.%true] -// CHECK:STDOUT: %F.call: init type = call .inst85.loc42_10(%.loc42_17) +// CHECK:STDOUT: %.loc42_17: bool = block_arg [template = constants.%true] +// CHECK:STDOUT: %F.call: init type = call .inst96.loc42_10(%.loc42_17) // CHECK:STDOUT: %.loc42_24.1: type = value_of_initializer %F.call // CHECK:STDOUT: %.loc42_24.2: type = converted %F.call, %.loc42_24.1 // CHECK:STDOUT: %or_.var: ref = var or_ @@ -73,10 +71,8 @@ var or_: F(true or true); // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: // 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_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_20.2: type = converted %int.make_type_signed, %.loc13_20.1 [template = constants.%i32] -// CHECK:STDOUT: br !if.expr.result(%.loc13_20.2) +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: br !if.expr.result(%i32) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] diff --git a/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon b/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon index 3227454354cc..19720122b217 100644 --- a/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon @@ -60,9 +60,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] @@ -70,10 +68,10 @@ fn Main() { // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] @@ -82,11 +80,11 @@ fn Main() { // CHECK:STDOUT: %tuple.1: %tuple.type.1 = tuple_value (%int_3.1, %int_4) [template] // CHECK:STDOUT: %tuple.2: %tuple.type.1 = tuple_value (%int_1.1, %int_2.1) [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %tuple.3: %tuple.type.2 = tuple_value (%int_1.2, %int_2.2) [template] @@ -95,11 +93,11 @@ fn Main() { // CHECK:STDOUT: %struct.1: %struct_type.x.y = struct_value (%int_3.1, %int_4) [template] // CHECK:STDOUT: %struct.2: %struct_type.x.y = struct_value (%int_1.1, %int_2.1) [template] // CHECK:STDOUT: %true: bool = bool_literal true [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %int_10.1: Core.IntLiteral = int_value 10 [template] -// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_10.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_10.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.5: = specific_function %Convert.bound.5, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_10.2: %i32 = int_value 10 [template] // CHECK:STDOUT: } @@ -107,7 +105,7 @@ fn Main() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -125,9 +123,7 @@ fn Main() { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -144,7 +140,7 @@ fn Main() { // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init %i32 = call %F.ref() // CHECK:STDOUT: %int_1.loc23: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc23: = bound_method %int_1.loc23, %impl.elem0.loc23 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc23: = specific_function %Convert.bound.loc23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc23: init %i32 = call %Convert.specific_fn.loc23(%int_1.loc23) [template = constants.%int_1.2] @@ -166,32 +162,30 @@ fn Main() { // CHECK:STDOUT: %tuple.loc28: %tuple.type.1 = tuple_value (%int_1.loc28, %int_2.loc28) [template = constants.%tuple.2] // CHECK:STDOUT: %.loc28_8.2: %tuple.type.1 = converted %.loc28_8.1, %tuple.loc28 [template = constants.%tuple.2] // CHECK:STDOUT: %int_32.loc29: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc29: init type = call constants.%Int(%int_32.loc29) [template = constants.%i32] -// CHECK:STDOUT: %.loc29_10.1: type = value_of_initializer %int.make_type_signed.loc29 [template = constants.%i32] -// CHECK:STDOUT: %.loc29_10.2: type = converted %int.make_type_signed.loc29, %.loc29_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc29: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.var: ref %i32 = var n // CHECK:STDOUT: %n: ref %i32 = bind_name n, %n.var // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc29: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc29: = bound_method %int_0, %impl.elem0.loc29 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc29: = specific_function %Convert.bound.loc29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc29: init %i32 = call %Convert.specific_fn.loc29(%int_0) [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc29_17: init %i32 = converted %int_0, %int.convert_checked.loc29 [template = constants.%int_0.2] -// CHECK:STDOUT: assign %n.var, %.loc29_17 +// CHECK:STDOUT: %.loc29: init %i32 = converted %int_0, %int.convert_checked.loc29 [template = constants.%int_0.2] +// CHECK:STDOUT: assign %n.var, %.loc29 // CHECK:STDOUT: %n.ref.loc34_4: ref %i32 = name_ref n, %n // CHECK:STDOUT: %n.ref.loc34_7: ref %i32 = name_ref n, %n // CHECK:STDOUT: %.loc34_8.1: %tuple.type.2 = tuple_literal (%n.ref.loc34_4, %n.ref.loc34_7) // CHECK:STDOUT: %int_1.loc34: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc34: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc34_17.1: %tuple.type.1 = tuple_literal (%int_1.loc34, %int_2.loc34) -// CHECK:STDOUT: %impl.elem0.loc34_17.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc34_17.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc34_17.1: = bound_method %int_1.loc34, %impl.elem0.loc34_17.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc34_17.1: = specific_function %Convert.bound.loc34_17.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc34_17.1: init %i32 = call %Convert.specific_fn.loc34_17.1(%int_1.loc34) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc34_17.2: init %i32 = converted %int_1.loc34, %int.convert_checked.loc34_17.1 [template = constants.%int_1.2] // CHECK:STDOUT: %tuple.elem0.loc34: %i32 = tuple_access %.loc34_8.1, element0 // CHECK:STDOUT: %.loc34_17.3: init %i32 = initialize_from %.loc34_17.2 to %tuple.elem0.loc34 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc34_17.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc34_17.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc34_17.2: = bound_method %int_2.loc34, %impl.elem0.loc34_17.2 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc34_17.2: = specific_function %Convert.bound.loc34_17.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc34_17.2: init %i32 = call %Convert.specific_fn.loc34_17.2(%int_2.loc34) [template = constants.%int_2.2] @@ -206,13 +200,11 @@ fn Main() { // CHECK:STDOUT: %tuple.loc34: %tuple.type.2 = tuple_value (%.loc34_4, %.loc34_7) // CHECK:STDOUT: %.loc34_8.2: %tuple.type.2 = converted %.loc34_8.1, %tuple.loc34 // CHECK:STDOUT: %int_32.loc39_3: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc39_3: init type = call constants.%Int(%int_32.loc39_3) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc39_3: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc39_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc39_9: init type = call constants.%Int(%int_32.loc39_9) [template = constants.%i32] -// CHECK:STDOUT: %.loc39_12.1: type = value_of_initializer %int.make_type_signed.loc39_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc39_12.2: type = converted %int.make_type_signed.loc39_9, %.loc39_12.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc39_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr.3] -// CHECK:STDOUT: assign %int.make_type_signed.loc39_3, %ptr +// CHECK:STDOUT: assign %i32.loc39_3, %ptr // CHECK:STDOUT: %int_1.loc44: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc44: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc44_18.1: %struct_type.x.y = struct_literal (%int_1.loc44, %int_2.loc44) @@ -234,20 +226,18 @@ fn Main() { // CHECK:STDOUT: !if.expr.then.loc49: // CHECK:STDOUT: %int_1.loc49: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_32.loc49: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc49: init type = call constants.%Int(%int_32.loc49) [template = constants.%i32] -// CHECK:STDOUT: %.loc49_12.1: type = value_of_initializer %int.make_type_signed.loc49 [template = constants.%i32] -// CHECK:STDOUT: %.loc49_12.2: type = converted %int.make_type_signed.loc49, %.loc49_12.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc49_12: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %i32.loc49: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc49_12: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc49_12: = bound_method %int_1.loc49, %impl.elem0.loc49_12 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc49_12: = specific_function %Convert.bound.loc49_12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc49_12: init %i32 = call %Convert.specific_fn.loc49_12(%int_1.loc49) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc49_12.3: %i32 = value_of_initializer %int.convert_checked.loc49_12 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc49_12.4: %i32 = converted %int_1.loc49, %.loc49_12.3 [template = constants.%int_1.2] -// CHECK:STDOUT: br !if.expr.result.loc49(%.loc49_12.4) +// CHECK:STDOUT: %.loc49_12.1: %i32 = value_of_initializer %int.convert_checked.loc49_12 [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc49_12.2: %i32 = converted %int_1.loc49, %.loc49_12.1 [template = constants.%int_1.2] +// CHECK:STDOUT: br !if.expr.result.loc49(%.loc49_12.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc49: // CHECK:STDOUT: %int_2.loc49: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc49_19: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc49_19: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc49_19: = bound_method %int_2.loc49, %impl.elem0.loc49_19 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc49_19: = specific_function %Convert.bound.loc49_19, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc49_19: init %i32 = call %Convert.specific_fn.loc49_19(%int_2.loc49) [template = constants.%int_2.2] @@ -258,16 +248,14 @@ fn Main() { // CHECK:STDOUT: !if.expr.result.loc49: // CHECK:STDOUT: %.loc49_4: %i32 = block_arg !if.expr.result.loc49 [template = constants.%int_1.2] // CHECK:STDOUT: %int_3.loc49: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %impl.elem0.loc49_27: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc49_27: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc49_27: = bound_method %int_3.loc49, %impl.elem0.loc49_27 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc49_27: = specific_function %Convert.bound.loc49_27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc49_27: init %i32 = call %Convert.specific_fn.loc49_27(%int_3.loc49) [template = constants.%int_3.2] // CHECK:STDOUT: %.loc49_27: init %i32 = converted %int_3.loc49, %int.convert_checked.loc49_27 [template = constants.%int_3.2] // CHECK:STDOUT: assign %.loc49_4, %.loc49_27 // CHECK:STDOUT: %int_32.loc52: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc52: init type = call constants.%Int(%int_32.loc52) [template = constants.%i32] -// CHECK:STDOUT: %.loc52_10.1: type = value_of_initializer %int.make_type_signed.loc52 [template = constants.%i32] -// CHECK:STDOUT: %.loc52_10.2: type = converted %int.make_type_signed.loc52, %.loc52_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc52: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: %true.loc56: bool = bool_literal true [template = constants.%true] @@ -286,7 +274,7 @@ fn Main() { // CHECK:STDOUT: !if.expr.result.loc56: // CHECK:STDOUT: %.loc56_4: %i32 = block_arg !if.expr.result.loc56 // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [template = constants.%int_10.1] -// CHECK:STDOUT: %impl.elem0.loc56: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc56: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc56: = bound_method %int_10, %impl.elem0.loc56 [template = constants.%Convert.bound.5] // CHECK:STDOUT: %Convert.specific_fn.loc56: = specific_function %Convert.bound.loc56, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.5] // CHECK:STDOUT: %int.convert_checked.loc56: init %i32 = call %Convert.specific_fn.loc56(%int_10) [template = constants.%int_10.2] diff --git a/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon b/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon index 66a2ba6133b2..0e3d3719ed03 100644 --- a/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon @@ -27,23 +27,21 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: } @@ -51,7 +49,7 @@ fn Main() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -69,9 +67,7 @@ fn Main() { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -81,7 +77,7 @@ fn Main() { // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: // 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: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] @@ -93,18 +89,16 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // 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: %.loc14_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_10.2: type = converted %int.make_type_signed, %.loc14_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_3, %impl.elem0 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_3) [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc14_17: init %i32 = converted %int_3, %int.convert_checked [template = constants.%int_3.2] -// CHECK:STDOUT: assign %a.var, %.loc14_17 +// CHECK:STDOUT: %.loc14: init %i32 = converted %int_3, %int.convert_checked [template = constants.%int_3.2] +// CHECK:STDOUT: assign %a.var, %.loc14 // CHECK:STDOUT: %a.ref.loc19_3: ref %i32 = name_ref a, %a // CHECK:STDOUT: %a.ref.loc19_7: ref %i32 = name_ref a, %a // CHECK:STDOUT: %a.ref.loc19_10: ref %i32 = name_ref a, %a diff --git a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon index 84ff5fcc8835..2e3fecb0fe40 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon @@ -25,15 +25,13 @@ fn Main() { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %float: f64 = float_literal 5.6000000000000005 [template] @@ -42,7 +40,7 @@ fn Main() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -60,18 +58,16 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // 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: %.loc12_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed, %.loc12_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_3, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_3) [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc12_17: init %i32 = converted %int_3, %int.convert_checked [template = constants.%int_3.2] -// CHECK:STDOUT: assign %a.var, %.loc12_17 +// CHECK:STDOUT: %.loc12: init %i32 = converted %int_3, %int.convert_checked [template = constants.%int_3.2] +// CHECK:STDOUT: assign %a.var, %.loc12 // CHECK:STDOUT: %a.ref: ref %i32 = name_ref a, %a // CHECK:STDOUT: %float: f64 = float_literal 5.6000000000000005 [template = constants.%float] // CHECK:STDOUT: %.loc19: %i32 = converted %float, [template = ] diff --git a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon index cffdd1230ffa..ca3606c738a3 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon @@ -25,9 +25,7 @@ fn Main() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template] @@ -37,7 +35,7 @@ fn Main() -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .Add = %import_ref.2 +// CHECK:STDOUT: .Add = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -54,9 +52,7 @@ fn Main() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_signed, %.loc11_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon b/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon index 365bb892370a..b67d0fa9bf4c 100644 --- a/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon @@ -19,9 +19,7 @@ fn Main() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template] @@ -31,7 +29,7 @@ fn Main() -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .Add = %import_ref.2 +// CHECK:STDOUT: .Add = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -48,9 +46,7 @@ fn Main() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_signed, %.loc11_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/overloaded/eq.carbon b/toolchain/check/testdata/operators/overloaded/eq.carbon index 14cfe5079c7a..8b3ce73429e5 100644 --- a/toolchain/check/testdata/operators/overloaded/eq.carbon +++ b/toolchain/check/testdata/operators/overloaded/eq.carbon @@ -366,7 +366,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %NotEqual.type.1: type = fn_type @NotEqual.1 [template] // CHECK:STDOUT: %NotEqual.1: %NotEqual.type.1 = struct_value () [template] // CHECK:STDOUT: %Equal.type.2: type = fn_type @Equal.2 [template] -// CHECK:STDOUT: %interface.1: = interface_witness (%Equal.1, %NotEqual.1) [template] +// CHECK:STDOUT: %interface: = interface_witness (%Equal.1, %NotEqual.1) [template] // CHECK:STDOUT: %TestRhsBad.type: type = fn_type @TestRhsBad [template] // CHECK:STDOUT: %TestRhsBad: %TestRhsBad.type = struct_value () [template] // CHECK:STDOUT: %TestLhsBad.type: type = fn_type @TestLhsBad [template] @@ -395,7 +395,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} {} -// CHECK:STDOUT: impl_decl @impl.1 [template] {} { +// CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %Eq.ref: type = name_ref Eq, imports.%import_ref.1 [template = constants.%Eq.type] @@ -442,7 +442,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: %C.ref as %Eq.ref { +// CHECK:STDOUT: impl @impl: %C.ref as %Eq.ref { // CHECK:STDOUT: %Equal.decl: %Equal.type.1 = fn_decl @Equal.1 [template = constants.%Equal.1] { // CHECK:STDOUT: %self.patt: %C = binding_pattern self // CHECK:STDOUT: %self.param_patt: %C = value_param_pattern %self.patt, runtime_param0 @@ -483,7 +483,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %interface: = interface_witness (%Equal.decl, %NotEqual.decl) [template = constants.%interface.1] +// CHECK:STDOUT: %interface: = interface_witness (%Equal.decl, %NotEqual.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Equal = %Equal.decl @@ -515,7 +515,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %D = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %Equal.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Equal.1] +// CHECK:STDOUT: %impl.elem0: %Equal.type.2 = interface_witness_access constants.%interface, element0 [template = constants.%Equal.1] // CHECK:STDOUT: %Equal.bound: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %.loc23_15: %C = converted %b.ref, [template = ] // CHECK:STDOUT: %Equal.call: init bool = call %Equal.bound(%a.ref, ) diff --git a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon index d1e1428fd670..14e525fa679d 100644 --- a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon +++ b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon @@ -36,13 +36,13 @@ fn Test() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %X: type = class_type @X [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32.builtin [template] // CHECK:STDOUT: %X.elem: type = unbound_element_type %X, %i32 [template] // CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.n [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.n [template] // CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(%X)> [template] @@ -63,23 +63,22 @@ fn Test() { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Source.type: type = fn_type @Source [template] // CHECK:STDOUT: %Source: %Source.type = struct_value () [template] -// CHECK:STDOUT: %require_complete.1: = require_complete_type %T [symbolic] +// CHECK:STDOUT: %require_complete.2: = require_complete_type %T [symbolic] // CHECK:STDOUT: %Source.specific_fn.1: = specific_function %Source, @Source(%T) [symbolic] // CHECK:STDOUT: %Test.type: type = fn_type @Test [template] // CHECK:STDOUT: %Test: %Test.type = struct_value () [template] // CHECK:STDOUT: %Source.specific_fn.2: = specific_function %Source, @Source(%X) [template] // CHECK:STDOUT: %Source.specific_fn.3: = specific_function %Source, @Source(%i32) [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [template = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %import_ref.5: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [template = constants.%ImplicitAs.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -95,22 +94,18 @@ fn Test() { // CHECK:STDOUT: %X.decl: type = class_decl @X [template = constants.%X] {} {} // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // 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: %.loc15_6.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_6.2: type = converted %int.make_type_signed, %.loc15_6.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.5 [template = constants.%ImplicitAs.generic] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%X)> [template = constants.%ImplicitAs.type.3] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.5 [template = constants.%ImplicitAs.generic] // 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: %.loc19_30.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc19_30.2: type = converted %int.make_type_signed, %.loc19_30.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%i32)> [template = constants.%ImplicitAs.type.4] // CHECK:STDOUT: } // CHECK:STDOUT: %Sink_i32.decl: %Sink_i32.type = fn_decl @Sink_i32 [template = constants.%Sink_i32] { @@ -118,9 +113,7 @@ fn Test() { // CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %.loc25_16.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc25_16.2: type = converted %int.make_type_signed, %.loc25_16.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: } @@ -147,7 +140,7 @@ fn Test() { // CHECK:STDOUT: %Test.decl: %Test.type = fn_decl @Test [template = constants.%Test] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: %.loc15_6.2 as %ImplicitAs.type { +// CHECK:STDOUT: impl @impl.1: %i32 as %ImplicitAs.type { // CHECK:STDOUT: %Convert.decl: %Convert.type.2 = fn_decl @Convert.2 [template = constants.%Convert.2] { // CHECK:STDOUT: %self.patt: %i32 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %i32 = value_param_pattern %self.patt, runtime_param0 @@ -155,9 +148,7 @@ fn Test() { // CHECK:STDOUT: %return.param_patt: %X = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // 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: %.loc16_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc16_20.2: type = converted %int.make_type_signed, %.loc16_20.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %self.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %self: %i32 = bind_name self, %self.param @@ -180,9 +171,7 @@ fn Test() { // CHECK:STDOUT: } { // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // 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: %.loc20_28.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc20_28.2: type = converted %int.make_type_signed, %.loc20_28.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param: %X = value_param runtime_param0 // CHECK:STDOUT: %self: %X = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -197,15 +186,13 @@ fn Test() { // CHECK:STDOUT: // CHECK:STDOUT: class @X { // 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: %.loc12_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_10.2: type = converted %int.make_type_signed, %.loc12_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8: %X.elem = field_decl n, element0 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12: %X.elem = field_decl n, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%X -// CHECK:STDOUT: .n = %.loc12_8 +// CHECK:STDOUT: .n = %.loc12 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -223,7 +210,7 @@ fn Test() { // CHECK:STDOUT: fn @Convert.3[%self.param_patt: %X]() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %X = name_ref self, %self -// CHECK:STDOUT: %n.ref: %X.elem = name_ref n, @X.%.loc12_8 [template = @X.%.loc12_8] +// CHECK:STDOUT: %n.ref: %X.elem = name_ref n, @X.%.loc12 [template = @X.%.loc12] // CHECK:STDOUT: %.loc20_45.1: ref %i32 = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc20_45.2: %i32 = bind_value %.loc20_45.1 // CHECK:STDOUT: return %.loc20_45.2 @@ -238,7 +225,7 @@ fn Test() { // CHECK:STDOUT: %T.patt.loc27_11.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc27_11.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type @Source.%T.loc27_11.2 (%T) [symbolic = %require_complete (constants.%require_complete.1)] +// CHECK:STDOUT: %require_complete: = require_complete_type @Source.%T.loc27_11.2 (%T) [symbolic = %require_complete (constants.%require_complete.2)] // CHECK:STDOUT: %Source.specific_fn.loc27_35.2: = specific_function constants.%Source, @Source(%T.loc27_11.2) [symbolic = %Source.specific_fn.loc27_35.2 (constants.%Source.specific_fn.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type) -> @Source.%T.loc27_11.2 (%T) { @@ -272,21 +259,19 @@ fn Test() { // CHECK:STDOUT: %Sink_X.ref: %Sink_X.type = name_ref Sink_X, file.%Sink_X.decl [template = constants.%Sink_X] // CHECK:STDOUT: %Source.ref.loc31: %Source.type = name_ref Source, file.%Source.decl [template = constants.%Source] // 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: %.loc31_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc31_20.2: type = converted %int.make_type_signed, %.loc31_20.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %Source.specific_fn.loc31: = specific_function %Source.ref.loc31, @Source(constants.%i32) [template = constants.%Source.specific_fn.3] // CHECK:STDOUT: %Source.call.loc31: init %i32 = call %Source.specific_fn.loc31() // CHECK:STDOUT: %impl.elem0.loc31: %Convert.type.3 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.2] // CHECK:STDOUT: %Convert.bound.loc31: = bound_method %Source.call.loc31, %impl.elem0.loc31 -// CHECK:STDOUT: %.loc31_20.3: ref %X = temporary_storage -// CHECK:STDOUT: %.loc31_20.4: %i32 = value_of_initializer %Source.call.loc31 -// CHECK:STDOUT: %.loc31_20.5: %i32 = converted %Source.call.loc31, %.loc31_20.4 -// CHECK:STDOUT: %Convert.call.loc31: init %X = call %Convert.bound.loc31(%.loc31_20.5) to %.loc31_20.3 -// CHECK:STDOUT: %.loc31_20.6: init %X = converted %Source.call.loc31, %Convert.call.loc31 -// CHECK:STDOUT: %.loc31_20.7: ref %X = temporary %.loc31_20.3, %.loc31_20.6 -// CHECK:STDOUT: %.loc31_20.8: %X = bind_value %.loc31_20.7 -// CHECK:STDOUT: %Sink_X.call: init %empty_tuple.type = call %Sink_X.ref(%.loc31_20.8) +// CHECK:STDOUT: %.loc31_20.1: ref %X = temporary_storage +// CHECK:STDOUT: %.loc31_20.2: %i32 = value_of_initializer %Source.call.loc31 +// CHECK:STDOUT: %.loc31_20.3: %i32 = converted %Source.call.loc31, %.loc31_20.2 +// CHECK:STDOUT: %Convert.call.loc31: init %X = call %Convert.bound.loc31(%.loc31_20.3) to %.loc31_20.1 +// CHECK:STDOUT: %.loc31_20.4: init %X = converted %Source.call.loc31, %Convert.call.loc31 +// CHECK:STDOUT: %.loc31_20.5: ref %X = temporary %.loc31_20.1, %.loc31_20.4 +// CHECK:STDOUT: %.loc31_20.6: %X = bind_value %.loc31_20.5 +// CHECK:STDOUT: %Sink_X.call: init %empty_tuple.type = call %Sink_X.ref(%.loc31_20.6) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -295,7 +280,7 @@ fn Test() { // CHECK:STDOUT: %T.patt.loc27_11.2 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%require_complete.1 +// CHECK:STDOUT: %require_complete => constants.%require_complete.2 // CHECK:STDOUT: %Source.specific_fn.loc27_35.2 => constants.%Source.specific_fn.1 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -309,7 +294,7 @@ fn Test() { // CHECK:STDOUT: %T.patt.loc27_11.2 => constants.%X // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%complete_type.1 +// CHECK:STDOUT: %require_complete => constants.%complete_type.3 // CHECK:STDOUT: %Source.specific_fn.loc27_35.2 => constants.%Source.specific_fn.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/index.carbon b/toolchain/check/testdata/operators/overloaded/index.carbon index 1bf1bcfde2c0..55f0e87a0dd2 100644 --- a/toolchain/check/testdata/operators/overloaded/index.carbon +++ b/toolchain/check/testdata/operators/overloaded/index.carbon @@ -222,9 +222,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [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: %IndexWith.type.1: type = generic_interface_type @IndexWith [template] @@ -239,17 +237,17 @@ let x: i32 = c[0]; // CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, 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.2(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_5.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_1.2, %int_5.2) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -257,12 +255,12 @@ let x: i32 = c[0]; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .IndexWith = %import_ref.2 -// CHECK:STDOUT: .ImplicitAs = %import_ref.7 +// CHECK:STDOUT: .IndexWith = %import_ref.5 +// CHECK:STDOUT: .ImplicitAs = %import_ref.10 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: %IndexWith.type.1 = import_ref Core//prelude/operators/index, IndexWith, loaded [template = constants.%IndexWith.generic] +// CHECK:STDOUT: %import_ref.5: %IndexWith.type.1 = import_ref Core//prelude/operators/index, IndexWith, loaded [template = constants.%IndexWith.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -274,44 +272,30 @@ let x: i32 = c[0]; // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: impl_decl @impl.1 [template] {} { // CHECK:STDOUT: %int_32.loc4_7: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_7: init type = call constants.%Int(%int_32.loc4_7) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_7: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_12: init type = call constants.%Int(%int_32.loc4_12) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_15.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc4_7, %int.make_type_signed.loc4_12) -// CHECK:STDOUT: %.loc4_15.2: type = value_of_initializer %int.make_type_signed.loc4_7 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_15.3: type = converted %int.make_type_signed.loc4_7, %.loc4_15.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_15.4: type = value_of_initializer %int.make_type_signed.loc4_12 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_15.5: type = converted %int.make_type_signed.loc4_12, %.loc4_15.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_15.6: type = converted %.loc4_15.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc4_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_15.1: %tuple.type.1 = tuple_literal (%i32.loc4_7, %i32.loc4_12) +// CHECK:STDOUT: %.loc4_15.2: type = converted %.loc4_15.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %IndexWith.ref: %IndexWith.type.1 = name_ref IndexWith, imports.%import_ref.2 [template = constants.%IndexWith.generic] +// CHECK:STDOUT: %IndexWith.ref: %IndexWith.type.1 = name_ref IndexWith, imports.%import_ref.5 [template = constants.%IndexWith.generic] // CHECK:STDOUT: %int_32.loc4_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_35: init type = call constants.%Int(%int_32.loc4_35) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_40: init type = call constants.%Int(%int_32.loc4_40) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_43.1: type = value_of_initializer %int.make_type_signed.loc4_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_43.2: type = converted %int.make_type_signed.loc4_35, %.loc4_43.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_43.3: type = value_of_initializer %int.make_type_signed.loc4_40 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_43.4: type = converted %int.make_type_signed.loc4_40, %.loc4_43.3 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %IndexWith.type: type = facet_type <@IndexWith, @IndexWith(constants.%i32, constants.%i32)> [template = constants.%IndexWith.type.3] // CHECK:STDOUT: } // CHECK:STDOUT: %int_32.loc10_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc10_9: init type = call constants.%Int(%int_32.loc10_9) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc10_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc10_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc10_14: init type = call constants.%Int(%int_32.loc10_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc10_9, %int.make_type_signed.loc10_14) -// CHECK:STDOUT: %.loc10_17.2: type = value_of_initializer %int.make_type_signed.loc10_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_17.3: type = converted %int.make_type_signed.loc10_9, %.loc10_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_17.4: type = value_of_initializer %int.make_type_signed.loc10_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_17.5: type = converted %int.make_type_signed.loc10_14, %.loc10_17.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_17.6: type = converted %.loc10_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc10_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc10_17.1: %tuple.type.1 = tuple_literal (%i32.loc10_9, %i32.loc10_14) +// CHECK:STDOUT: %.loc10_17.2: type = converted %.loc10_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // 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_8.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_8.2: type = converted %int.make_type_signed.loc11, %.loc11_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: %.loc4_15.6 as %IndexWith.type { +// CHECK:STDOUT: impl @impl.1: %.loc4_15.2 as %IndexWith.type { // CHECK:STDOUT: %At.decl: %At.type.2 = fn_decl @At.2 [template = constants.%At.2] { // CHECK:STDOUT: %self.patt: %tuple.type.2 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %tuple.type.2 = value_param_pattern %self.patt, runtime_param0 @@ -320,15 +304,11 @@ let x: i32 = c[0]; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.1.%.loc4_15.6 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.1.%.loc4_15.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %int_32.loc5_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_32: init type = call constants.%Int(%int_32.loc5_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_32.1: type = value_of_initializer %int.make_type_signed.loc5_32 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_32.2: type = converted %int.make_type_signed.loc5_32, %.loc5_32.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_40: init type = call constants.%Int(%int_32.loc5_40) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_40.1: type = value_of_initializer %int.make_type_signed.loc5_40 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_40.2: type = converted %int.make_type_signed.loc5_40, %.loc5_40.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param: %tuple.type.2 = value_param runtime_param0 // CHECK:STDOUT: %self: %tuple.type.2 = bind_name self, %self.param // CHECK:STDOUT: %subscript.param: %i32 = value_param runtime_param1 @@ -356,13 +336,13 @@ let x: i32 = c[0]; // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] // CHECK:STDOUT: %.loc10_26.1: %tuple.type.3 = tuple_literal (%int_1, %int_5) -// CHECK:STDOUT: %impl.elem0.loc10_26.1: %Convert.type.2 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc10_26.1: %Convert.type.2 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc10_26.1: = bound_method %int_1, %impl.elem0.loc10_26.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc10_26.1: = specific_function %Convert.bound.loc10_26.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc10_26.1: init %i32 = call %Convert.specific_fn.loc10_26.1(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc10_26.2: %i32 = value_of_initializer %int.convert_checked.loc10_26.1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc10_26.3: %i32 = converted %int_1, %.loc10_26.2 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc10_26.2: %Convert.type.2 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc10_26.2: %Convert.type.2 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc10_26.2: = bound_method %int_5, %impl.elem0.loc10_26.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc10_26.2: = specific_function %Convert.bound.loc10_26.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc10_26.2: init %i32 = call %Convert.specific_fn.loc10_26.2(%int_5) [template = constants.%int_5.2] @@ -373,7 +353,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %s: %tuple.type.2 = bind_name s, %.loc10_27 // CHECK:STDOUT: %s.ref: %tuple.type.2 = name_ref s, %s // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc11_17.1: %Convert.type.2 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_17.1: %Convert.type.2 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11: = bound_method %int_0, %impl.elem0.loc11_17.1 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc11: = specific_function %Convert.bound.loc11, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %Convert.specific_fn.loc11(%int_0) [template = constants.%int_0.2] @@ -402,7 +382,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %At.type.2: type = fn_type @At.2 [template] // CHECK:STDOUT: %At.2: %At.type.2 = struct_value () [template] // CHECK:STDOUT: %At.type.3: type = fn_type @At.1, @IndexWith(%SubscriptType.1, %ElementType.1) [template] -// CHECK:STDOUT: %interface.1: = interface_witness (%At.2) [template] +// CHECK:STDOUT: %interface: = interface_witness (%At.2) [template] // CHECK:STDOUT: %ElementType.val: %ElementType.1 = struct_value () [template] // CHECK:STDOUT: %C.val: %C = struct_value () [template] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] @@ -431,7 +411,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %ElementType.decl: type = class_decl @ElementType [template = constants.%ElementType.1] {} {} // CHECK:STDOUT: %SubscriptType.decl: type = class_decl @SubscriptType [template = constants.%SubscriptType.1] {} {} -// CHECK:STDOUT: impl_decl @impl.1 [template] {} { +// CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %IndexWith.ref: %IndexWith.type.1 = name_ref IndexWith, imports.%import_ref.1 [template = constants.%IndexWith.generic] @@ -443,7 +423,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %ElementType.ref: type = name_ref ElementType, %ElementType.decl [template = constants.%ElementType.1] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: %C.ref as %IndexWith.type { +// CHECK:STDOUT: impl @impl: %C.ref as %IndexWith.type { // CHECK:STDOUT: %At.decl: %At.type.2 = fn_decl @At.2 [template = constants.%At.2] { // CHECK:STDOUT: %self.patt: %C = binding_pattern self // CHECK:STDOUT: %self.param_patt: %C = value_param_pattern %self.patt, runtime_param0 @@ -452,7 +432,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %return.patt: %ElementType.1 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %ElementType.1 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.1.%C.ref [template = constants.%C] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%C.ref [template = constants.%C] // CHECK:STDOUT: %SubscriptType.ref: type = name_ref SubscriptType, file.%SubscriptType.decl [template = constants.%SubscriptType.1] // CHECK:STDOUT: %ElementType.ref: type = name_ref ElementType, file.%ElementType.decl [template = constants.%ElementType.1] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 @@ -462,7 +442,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %return.param: ref %ElementType.1 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %ElementType.1 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %interface: = interface_witness (%At.decl) [template = constants.%interface.1] +// CHECK:STDOUT: %interface: = interface_witness (%At.decl) [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .At = %At.decl @@ -513,7 +493,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %.loc22_25.1: %SubscriptType.1 = converted %int_0, [template = ] -// CHECK:STDOUT: %impl.elem0: %At.type.3 = interface_witness_access constants.%interface.1, element0 [template = constants.%At.2] +// CHECK:STDOUT: %impl.elem0: %At.type.3 = interface_witness_access constants.%interface, element0 [template = constants.%At.2] // CHECK:STDOUT: %At.bound: = bound_method %c.ref, %impl.elem0 // CHECK:STDOUT: %.loc22_25.2: ref %ElementType.1 = temporary_storage // CHECK:STDOUT: %At.call: init %ElementType.1 = call %At.bound(%c.ref, ) to %.loc22_25.2 @@ -528,19 +508,17 @@ let x: i32 = c[0]; // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %C.val: %C = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .IndexWith = %import_ref.2 +// CHECK:STDOUT: .IndexWith = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -557,13 +535,11 @@ let x: i32 = c[0]; // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // 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: %.loc10_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc10_8.2: type = converted %int.make_type_signed, %.loc10_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C diff --git a/toolchain/check/testdata/package_expr/fail_not_found.carbon b/toolchain/check/testdata/package_expr/fail_not_found.carbon index b2cf11948940..19ce199b5f41 100644 --- a/toolchain/check/testdata/package_expr/fail_not_found.carbon +++ b/toolchain/check/testdata/package_expr/fail_not_found.carbon @@ -21,14 +21,12 @@ fn Main() { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -46,9 +44,7 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // 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: %.loc15_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_10.2: type = converted %int.make_type_signed, %.loc15_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %y.var: ref %i32 = var y // CHECK:STDOUT: %y: ref %i32 = bind_name y, %y.var // CHECK:STDOUT: %package.ref: = name_ref package, package [template = package] diff --git a/toolchain/check/testdata/package_expr/syntax.carbon b/toolchain/check/testdata/package_expr/syntax.carbon index 5479472f294c..9db92b049de9 100644 --- a/toolchain/check/testdata/package_expr/syntax.carbon +++ b/toolchain/check/testdata/package_expr/syntax.carbon @@ -45,15 +45,13 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -61,7 +59,7 @@ fn Main() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -75,15 +73,11 @@ fn Main() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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_8.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_8.2: type = converted %int.make_type_signed.loc4, %.loc4_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %x.var: ref %i32 = var x // CHECK:STDOUT: %x: ref %i32 = bind_name x, %x.var // 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_8.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_8.2: type = converted %int.make_type_signed.loc5, %.loc5_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %y.var: ref %i32 = var y // CHECK:STDOUT: %y: ref %i32 = bind_name y, %y.var // CHECK:STDOUT: } @@ -91,7 +85,7 @@ fn Main() { // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // 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: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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] @@ -108,21 +102,19 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } @@ -130,7 +122,7 @@ fn Main() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -144,9 +136,7 @@ fn Main() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_8.2: type = converted %int.make_type_signed, %.loc4_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %x.var: ref %i32 = var x // CHECK:STDOUT: %x: ref %i32 = bind_name x, %x.var // CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} {} @@ -155,35 +145,31 @@ fn Main() { // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_10.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_10.2: type = converted %int.make_type_signed.loc7, %.loc7_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %x.var: ref %i32 = var x // CHECK:STDOUT: %x: ref %i32 = bind_name x, %x.var // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc7_17: init %i32 = converted %int_1, %int.convert_checked [template = constants.%int_1.2] -// CHECK:STDOUT: assign %x.var, %.loc7_17 +// CHECK:STDOUT: %.loc7: init %i32 = converted %int_1, %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: assign %x.var, %.loc7 // CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%int_32.loc9) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_10.1: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_10.2: type = converted %int.make_type_signed.loc9, %.loc9_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %y.var: ref %i32 = var y // CHECK:STDOUT: %y: ref %i32 = bind_name y, %y.var // CHECK:STDOUT: %package.ref: = name_ref package, package [template = package] // CHECK:STDOUT: %x.ref: ref %i32 = name_ref x, file.%x -// CHECK:STDOUT: %.loc9_23: %i32 = bind_value %x.ref -// CHECK:STDOUT: assign %y.var, %.loc9_23 +// CHECK:STDOUT: %.loc9: %i32 = bind_value %x.ref +// CHECK:STDOUT: assign %y.var, %.loc9 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // 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: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/packages/fail_conflict_no_namespaces.carbon b/toolchain/check/testdata/packages/fail_conflict_no_namespaces.carbon index b6f7faedfeb7..6a905185ff06 100644 --- a/toolchain/check/testdata/packages/fail_conflict_no_namespaces.carbon +++ b/toolchain/check/testdata/packages/fail_conflict_no_namespaces.carbon @@ -64,14 +64,12 @@ import library "var"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -84,9 +82,7 @@ import library "var"; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_10.2: type = converted %int.make_type_signed, %.loc4_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %Foo.var: ref %i32 = var Foo // CHECK:STDOUT: %Foo: ref %i32 = bind_name Foo, %Foo.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/packages/fail_import_type_error.carbon b/toolchain/check/testdata/packages/fail_import_type_error.carbon index 2e131050d8df..430e758ca9b1 100644 --- a/toolchain/check/testdata/packages/fail_import_type_error.carbon +++ b/toolchain/check/testdata/packages/fail_import_type_error.carbon @@ -82,9 +82,7 @@ var d: i32 = d_ref; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -115,27 +113,19 @@ var d: i32 = d_ref; // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%int_32.loc6) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_8.2: type = converted %int.make_type_signed.loc6, %.loc6_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%int_32.loc7) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_signed.loc7, %.loc7_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%int_32.loc8) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_8.2: type = converted %int.make_type_signed.loc8, %.loc8_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc8: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %c.var: ref %i32 = var c // CHECK:STDOUT: %c: ref %i32 = bind_name c, %c.var // CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%int_32.loc9) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_8.1: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_8.2: type = converted %int.make_type_signed.loc9, %.loc9_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %d.var: ref %i32 = var d // CHECK:STDOUT: %d: ref %i32 = bind_name d, %d.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/packages/implicit_imports_prelude.carbon b/toolchain/check/testdata/packages/implicit_imports_prelude.carbon index 2e68450e2d83..27424c5b306a 100644 --- a/toolchain/check/testdata/packages/implicit_imports_prelude.carbon +++ b/toolchain/check/testdata/packages/implicit_imports_prelude.carbon @@ -26,15 +26,13 @@ var b: i32 = a; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -42,7 +40,7 @@ var b: i32 = a; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -55,9 +53,7 @@ var b: i32 = a; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_8.2: type = converted %int.make_type_signed, %.loc4_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: } @@ -65,7 +61,7 @@ var b: i32 = a; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // 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: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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] @@ -78,15 +74,13 @@ var b: i32 = a; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: ref %i32 = import_ref Main//lib, a, loaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref.36 +// CHECK:STDOUT: .Int = %import_ref.191 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -102,9 +96,7 @@ var b: i32 = a; // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: %Core.import = import Core // 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_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc4_8.2: type = converted %int.make_type_signed, %.loc4_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/pointer/address_of_deref.carbon b/toolchain/check/testdata/pointer/address_of_deref.carbon index 4b79a45450d0..e8236d23694d 100644 --- a/toolchain/check/testdata/pointer/address_of_deref.carbon +++ b/toolchain/check/testdata/pointer/address_of_deref.carbon @@ -17,17 +17,15 @@ fn F() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = 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] @@ -36,7 +34,7 @@ fn F() -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -53,9 +51,7 @@ fn F() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -64,18 +60,16 @@ fn F() -> i32 { // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: // 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: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.var: ref %i32 = var n // CHECK:STDOUT: %n: ref %i32 = bind_name n, %n.var // 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: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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: %.loc12: init %i32 = converted %int_0, %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: assign %n.var, %.loc12 // CHECK:STDOUT: %n.ref: ref %i32 = name_ref n, %n // CHECK:STDOUT: %addr.loc13_13: %ptr = addr_of %n.ref // CHECK:STDOUT: %.loc13_12: ref %i32 = deref %addr.loc13_13 diff --git a/toolchain/check/testdata/pointer/address_of_lvalue.carbon b/toolchain/check/testdata/pointer/address_of_lvalue.carbon index 054f4afb9155..1938ea3be140 100644 --- a/toolchain/check/testdata/pointer/address_of_lvalue.carbon +++ b/toolchain/check/testdata/pointer/address_of_lvalue.carbon @@ -26,22 +26,20 @@ fn F() { // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = 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] @@ -56,7 +54,7 @@ fn F() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -74,27 +72,23 @@ fn F() { // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // 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: %i32.loc12_15: type = class_type @Int, @Int(constants.%int_32) [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: %i32.loc12_24: type = class_type @Int, @Int(constants.%int_32) [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: %impl.elem0.loc12_46.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_46.1: = 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 %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: %impl.elem0.loc12_46.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12_46.2: = 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 %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] @@ -105,13 +99,9 @@ fn F() { // 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: %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: %i32.loc14_15: type = class_type @Int, @Int(constants.%int_32) [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: %i32.loc14_24: type = class_type @Int, @Int(constants.%int_32) [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 @@ -120,50 +110,42 @@ fn F() { // 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: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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: %addr.loc15: %ptr.2 = addr_of %.loc15_19 +// CHECK:STDOUT: %.loc15: ref %i32 = struct_access %s.ref.loc15, element0 +// CHECK:STDOUT: %addr.loc15: %ptr.2 = addr_of %.loc15 // 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: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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: %addr.loc16: %ptr.2 = addr_of %.loc16_19 +// CHECK:STDOUT: %.loc16: ref %i32 = struct_access %s.ref.loc16, element1 +// CHECK:STDOUT: %addr.loc16: %ptr.2 = addr_of %.loc16 // 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: %i32.loc18_11: type = class_type @Int, @Int(constants.%int_32) [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] -// CHECK:STDOUT: %.loc18_19.4: type = value_of_initializer %int.make_type_signed.loc18_16 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_19.5: type = converted %int.make_type_signed.loc18_16, %.loc18_19.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_19.6: type = converted %.loc18_19.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc18_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_19.1: %tuple.type.1 = tuple_literal (%i32.loc18_11, %i32.loc18_16) +// CHECK:STDOUT: %.loc18_19.2: 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: %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: %impl.elem0.loc18_28.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc18_28.1: = 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 %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: %impl.elem0.loc18_28.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc18_28.2: = 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 %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] @@ -174,9 +156,7 @@ fn F() { // 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: %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: %i32.loc19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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 @@ -186,9 +166,7 @@ fn F() { // 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: %i32.loc20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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 diff --git a/toolchain/check/testdata/pointer/basic.carbon b/toolchain/check/testdata/pointer/basic.carbon index 3b335ca50ed5..d7995fe7d9fe 100644 --- a/toolchain/check/testdata/pointer/basic.carbon +++ b/toolchain/check/testdata/pointer/basic.carbon @@ -19,17 +19,15 @@ fn F() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = 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] @@ -38,7 +36,7 @@ fn F() -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -55,9 +53,7 @@ fn F() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -66,22 +62,18 @@ fn F() -> i32 { // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: // 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: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.var: ref %i32 = var n // CHECK:STDOUT: %n: ref %i32 = bind_name n, %n.var // 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: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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: %.loc12: init %i32 = converted %int_0, %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: assign %n.var, %.loc12 // 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: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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 diff --git a/toolchain/check/testdata/pointer/fail_address_of_value.carbon b/toolchain/check/testdata/pointer/fail_address_of_value.carbon index cba40d66099f..2748d4f5e238 100644 --- a/toolchain/check/testdata/pointer/fail_address_of_value.carbon +++ b/toolchain/check/testdata/pointer/fail_address_of_value.carbon @@ -103,9 +103,7 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %struct_type.a.1: type = struct_type {.a: %i32} [template] @@ -148,7 +146,7 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -172,9 +170,7 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -183,9 +179,7 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: %return.param_patt: %struct_type.a.1 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [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 @@ -200,9 +194,7 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: %param.param_patt: %i32 = value_param_pattern %param.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %i32.loc95: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %param.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %param: %i32 = bind_name param, %param.param // CHECK:STDOUT: } @@ -268,12 +260,10 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: fn @AddressOfType() { // CHECK:STDOUT: !entry: // 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: %i32.loc79: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %addr.loc79: %ptr.8 = addr_of [template = ] // 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: %i32.loc84: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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 [template = ] @@ -296,9 +286,7 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: fn @AddressOfParam(%param.param_patt: %i32) { // CHECK:STDOUT: !entry: // 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: %i32.loc99: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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 diff --git a/toolchain/check/testdata/pointer/fail_deref_error.carbon b/toolchain/check/testdata/pointer/fail_deref_error.carbon index 7be583666fbd..a396b0f7dad5 100644 --- a/toolchain/check/testdata/pointer/fail_deref_error.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_error.carbon @@ -22,14 +22,12 @@ let n2: i32 = undeclared->foo; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -43,13 +41,9 @@ let n2: i32 = undeclared->foo; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [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: %i32.loc19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { diff --git a/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon b/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon index bd0176ec7427..59e46091f029 100644 --- a/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon @@ -44,10 +44,8 @@ fn Deref(n: i32) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%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] @@ -57,7 +55,7 @@ fn Deref(n: i32) { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -74,9 +72,7 @@ fn Deref(n: i32) { // CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/pointer/fail_deref_type.carbon b/toolchain/check/testdata/pointer/fail_deref_type.carbon index d41a0e589e49..949b3b0639d9 100644 --- a/toolchain/check/testdata/pointer/fail_deref_type.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_type.carbon @@ -25,14 +25,12 @@ var p2: i32->foo; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -46,17 +44,13 @@ var p2: i32->foo; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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 = deref %.loc18_9.2 +// CHECK:STDOUT: %i32.loc18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc18: ref = deref %i32.loc18 // CHECK:STDOUT: %p.var: ref = var p // CHECK:STDOUT: %p: ref = bind_name p, %p.var // 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 = deref %.loc22_9.2 +// CHECK:STDOUT: %i32.loc22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc22: ref = deref %i32.loc22 // CHECK:STDOUT: %foo.ref: = name_ref foo, [template = ] // CHECK:STDOUT: %p2.var: ref = var p2 // CHECK:STDOUT: %p2: ref = bind_name p2, %p2.var diff --git a/toolchain/check/testdata/pointer/import.carbon b/toolchain/check/testdata/pointer/import.carbon index b8b62dffa9a5..3018624adfec 100644 --- a/toolchain/check/testdata/pointer/import.carbon +++ b/toolchain/check/testdata/pointer/import.carbon @@ -25,15 +25,13 @@ var a: i32* = a_ref; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = 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] @@ -42,7 +40,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -56,15 +54,11 @@ var a: i32* = a_ref; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [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: %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: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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 @@ -73,7 +67,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // 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: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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] @@ -89,9 +83,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %ptr: type = ptr_type %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -99,7 +91,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: %import_ref.1 = import_ref Implicit//default, a_orig, unloaded // CHECK:STDOUT: %import_ref.2: ref %ptr = import_ref Implicit//default, a_ref, loaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref.37 +// CHECK:STDOUT: .Int = %import_ref.192 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -116,9 +108,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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 diff --git a/toolchain/check/testdata/pointer/nested_const.carbon b/toolchain/check/testdata/pointer/nested_const.carbon index fef8757375fe..81a95ce749b0 100644 --- a/toolchain/check/testdata/pointer/nested_const.carbon +++ b/toolchain/check/testdata/pointer/nested_const.carbon @@ -17,9 +17,7 @@ fn F(p: const (const (const i32*)*)) -> const i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%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] @@ -31,7 +29,7 @@ fn F(p: const (const (const i32*)*)) -> const i32 { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -50,18 +48,14 @@ fn F(p: const (const (const i32*)*)) -> const i32 { // CHECK:STDOUT: %return.param_patt: %const.1 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // 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: %i32.loc12_29: type = class_type @Int, @Int(constants.%int_32) [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: %i32.loc12_47: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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 diff --git a/toolchain/check/testdata/pointer/types.carbon b/toolchain/check/testdata/pointer/types.carbon index 08ad8c63581c..8700887e6d7a 100644 --- a/toolchain/check/testdata/pointer/types.carbon +++ b/toolchain/check/testdata/pointer/types.carbon @@ -20,9 +20,7 @@ fn ConstPtr(p: const i32*) -> (const i32)* { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%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] @@ -34,7 +32,7 @@ fn ConstPtr(p: const i32*) -> (const i32)* { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -54,14 +52,10 @@ fn ConstPtr(p: const i32*) -> (const i32)* { // CHECK:STDOUT: %return.param_patt: %ptr.1 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // 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: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [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: %i32.loc11_20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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 @@ -75,15 +69,11 @@ fn ConstPtr(p: const i32*) -> (const i32)* { // CHECK:STDOUT: %return.param_patt: %ptr.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // 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: %i32.loc15_22: type = class_type @Int, @Int(constants.%int_32) [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: %i32.loc15_38: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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 diff --git a/toolchain/check/testdata/return/code_after_return.carbon b/toolchain/check/testdata/return/code_after_return.carbon index f29dd0d4697f..c169dce60d07 100644 --- a/toolchain/check/testdata/return/code_after_return.carbon +++ b/toolchain/check/testdata/return/code_after_return.carbon @@ -23,7 +23,7 @@ fn Main() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/return/code_after_return_value.carbon b/toolchain/check/testdata/return/code_after_return_value.carbon index e095125ac9a9..3f9d17e36279 100644 --- a/toolchain/check/testdata/return/code_after_return_value.carbon +++ b/toolchain/check/testdata/return/code_after_return_value.carbon @@ -26,17 +26,15 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -45,7 +43,7 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Bool = %import_ref.1 // CHECK:STDOUT: .Int = %import_ref.2 -// CHECK:STDOUT: .ImplicitAs = %import_ref.3 +// CHECK:STDOUT: .ImplicitAs = %import_ref.6 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -67,9 +65,7 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc11_9.2: type = converted %bool.make_type, %.loc11_9.1 [template = bool] // 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_18.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_18.2: type = converted %int.make_type_signed, %.loc11_18.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.param: bool = value_param runtime_param0 // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -80,7 +76,7 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: fn @F(%b.param_patt: bool) -> %i32 { // CHECK:STDOUT: !entry: // 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: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/return/fail_call_in_type.carbon b/toolchain/check/testdata/return/fail_call_in_type.carbon index 0adc0030b71f..abc736d56629 100644 --- a/toolchain/check/testdata/return/fail_call_in_type.carbon +++ b/toolchain/check/testdata/return/fail_call_in_type.carbon @@ -22,9 +22,7 @@ fn Six() -> ReturnType() { return 6; } // CHECK:STDOUT: %ReturnType.type: type = fn_type @ReturnType [template] // CHECK:STDOUT: %ReturnType: %ReturnType.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Six.type: type = fn_type @Six [template] // CHECK:STDOUT: %Six: %Six.type = struct_value () [template] // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template] @@ -32,7 +30,7 @@ fn Six() -> ReturnType() { return 6; } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -68,10 +66,8 @@ fn Six() -> ReturnType() { return 6; } // CHECK:STDOUT: fn @ReturnType() -> type { // CHECK:STDOUT: !entry: // 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_37.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_37.2: type = converted %int.make_type_signed, %.loc13_37.1 [template = constants.%i32] -// CHECK:STDOUT: return %.loc13_37.2 +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: return %i32 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Six() -> { diff --git a/toolchain/check/testdata/return/fail_missing_return.carbon b/toolchain/check/testdata/return/fail_missing_return.carbon index e19b524283dd..83552186e35b 100644 --- a/toolchain/check/testdata/return/fail_missing_return.carbon +++ b/toolchain/check/testdata/return/fail_missing_return.carbon @@ -18,16 +18,14 @@ fn Main() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -44,9 +42,7 @@ fn Main() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_signed, %.loc11_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/return/fail_return_var_no_returned_var.carbon b/toolchain/check/testdata/return/fail_return_var_no_returned_var.carbon index e8142a37904a..ec099bb066e7 100644 --- a/toolchain/check/testdata/return/fail_return_var_no_returned_var.carbon +++ b/toolchain/check/testdata/return/fail_return_var_no_returned_var.carbon @@ -19,16 +19,14 @@ fn Procedure() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Procedure.type: type = fn_type @Procedure [template] // CHECK:STDOUT: %Procedure: %Procedure.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -45,9 +43,7 @@ fn Procedure() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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_19.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_signed, %.loc11_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/return/fail_return_with_returned_var.carbon b/toolchain/check/testdata/return/fail_return_with_returned_var.carbon index 8ebaa8fb53ec..facaa2f2f069 100644 --- a/toolchain/check/testdata/return/fail_return_with_returned_var.carbon +++ b/toolchain/check/testdata/return/fail_return_with_returned_var.carbon @@ -36,32 +36,30 @@ fn G() -> C { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %i32 [template] // CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.a.b.1 [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.a.b.1 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [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.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %C.val: %C = struct_value (%int_1.2, %int_2.2) [template] @@ -70,7 +68,7 @@ fn G() -> C { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -89,9 +87,7 @@ fn G() -> C { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -108,16 +104,12 @@ fn G() -> C { // CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %int_32.loc23_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc23_18: init type = call constants.%Int(%int_32.loc23_18) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_18.1: type = value_of_initializer %int.make_type_signed.loc23_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_18.2: type = converted %int.make_type_signed.loc23_18, %.loc23_18.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc23_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc23_16: %C.elem = field_decl a, element0 [template] // CHECK:STDOUT: %int_32.loc23_30: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc23_30: init type = call constants.%Int(%int_32.loc23_30) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_30.1: type = value_of_initializer %int.make_type_signed.loc23_30 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_30.2: type = converted %int.make_type_signed.loc23_30, %.loc23_30.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc23_30: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc23_28: %C.elem = field_decl b, element1 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -129,18 +121,16 @@ fn G() -> C { // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: // 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_19.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_19.2: type = converted %int.make_type_signed.loc12, %.loc12_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %v: ref %i32 = bind_name v, %v.var // 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: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc12_26: init %i32 = converted %int_0, %int.convert_checked [template = constants.%int_0.2] -// CHECK:STDOUT: assign %v.var, %.loc12_26 +// CHECK:STDOUT: %.loc12: init %i32 = converted %int_0, %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: assign %v.var, %.loc12 // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -152,14 +142,14 @@ fn G() -> C { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc25_38.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc25_38.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc25_38.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc25_38.1: = bound_method %int_1, %impl.elem0.loc25_38.1 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc25_38.1: = specific_function %Convert.bound.loc25_38.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc25_38.1: init %i32 = call %Convert.specific_fn.loc25_38.1(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc25_38.2: init %i32 = converted %int_1, %int.convert_checked.loc25_38.1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc25_38.3: ref %i32 = class_element_access %return, element0 // CHECK:STDOUT: %.loc25_38.4: init %i32 = initialize_from %.loc25_38.2 to %.loc25_38.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc25_38.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc25_38.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc25_38.2: = bound_method %int_2, %impl.elem0.loc25_38.2 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc25_38.2: = specific_function %Convert.bound.loc25_38.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc25_38.2: init %i32 = call %Convert.specific_fn.loc25_38.2(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/return/fail_returned_var_shadow.carbon b/toolchain/check/testdata/return/fail_returned_var_shadow.carbon index c4b0ea130c3a..e28c88a73518 100644 --- a/toolchain/check/testdata/return/fail_returned_var_shadow.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_shadow.carbon @@ -43,22 +43,20 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %SameScope.type: type = fn_type @SameScope [template] // CHECK:STDOUT: %SameScope: %SameScope.type = struct_value () [template] // CHECK:STDOUT: %true: bool = bool_literal true [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %DifferentScopes.type: type = fn_type @DifferentScopes [template] @@ -68,7 +66,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -86,9 +84,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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_19.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_signed.loc11, %.loc11_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -97,9 +93,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc26: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc26: init type = call constants.%Int(%int_32.loc26) [template = constants.%i32] -// CHECK:STDOUT: %.loc26_25.1: type = value_of_initializer %int.make_type_signed.loc26 [template = constants.%i32] -// CHECK:STDOUT: %.loc26_25.2: type = converted %int.make_type_signed.loc26, %.loc26_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -112,36 +106,32 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.then: // 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_21.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_21.2: type = converted %int.make_type_signed.loc13, %.loc13_21.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %v: ref %i32 = bind_name v, %v.var // CHECK:STDOUT: %int_0.loc13: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13: = bound_method %int_0.loc13, %impl.elem0.loc13 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc13: = specific_function %Convert.bound.loc13, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %Convert.specific_fn.loc13(%int_0.loc13) [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc13_28: init %i32 = converted %int_0.loc13, %int.convert_checked.loc13 [template = constants.%int_0.2] -// CHECK:STDOUT: assign %v.var, %.loc13_28 +// CHECK:STDOUT: %.loc13: init %i32 = converted %int_0.loc13, %int.convert_checked.loc13 [template = constants.%int_0.2] +// CHECK:STDOUT: assign %v.var, %.loc13 // CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_21.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_21.2: type = converted %int.make_type_signed.loc21, %.loc21_21.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %w.var: ref %i32 = var w // CHECK:STDOUT: %w: ref %i32 = bind_name w, %w.var // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc21: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc21: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc21: = bound_method %int_1, %impl.elem0.loc21 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc21: = specific_function %Convert.bound.loc21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %Convert.specific_fn.loc21(%int_1) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc21_28: init %i32 = converted %int_1, %int.convert_checked.loc21 [template = constants.%int_1.2] -// CHECK:STDOUT: assign %w.var, %.loc21_28 +// CHECK:STDOUT: %.loc21: init %i32 = converted %int_1, %int.convert_checked.loc21 [template = constants.%int_1.2] +// CHECK:STDOUT: assign %w.var, %.loc21 // CHECK:STDOUT: br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.else: // CHECK:STDOUT: %int_0.loc23: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc23: = bound_method %int_0.loc23, %impl.elem0.loc23 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc23: = specific_function %Convert.bound.loc23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc23: init %i32 = call %Convert.specific_fn.loc23(%int_0.loc23) [template = constants.%int_0.2] @@ -157,35 +147,31 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc27: // CHECK:STDOUT: %int_32.loc28: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc28: init type = call constants.%Int(%int_32.loc28) [template = constants.%i32] -// CHECK:STDOUT: %.loc28_21.1: type = value_of_initializer %int.make_type_signed.loc28 [template = constants.%i32] -// CHECK:STDOUT: %.loc28_21.2: type = converted %int.make_type_signed.loc28, %.loc28_21.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc28: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %v: ref %i32 = bind_name v, %v.var // CHECK:STDOUT: %int_0.loc28: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc28: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc28: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc28: = bound_method %int_0.loc28, %impl.elem0.loc28 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc28: = specific_function %Convert.bound.loc28, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc28: init %i32 = call %Convert.specific_fn.loc28(%int_0.loc28) [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc28_28: init %i32 = converted %int_0.loc28, %int.convert_checked.loc28 [template = constants.%int_0.2] -// CHECK:STDOUT: assign %v.var, %.loc28_28 +// CHECK:STDOUT: %.loc28: init %i32 = converted %int_0.loc28, %int.convert_checked.loc28 [template = constants.%int_0.2] +// CHECK:STDOUT: assign %v.var, %.loc28 // CHECK:STDOUT: %true.loc29: bool = bool_literal true [template = constants.%true] // CHECK:STDOUT: if %true.loc29 br !if.then.loc29 else br !if.else.loc29 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc29: // CHECK:STDOUT: %int_32.loc36: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc36: init type = call constants.%Int(%int_32.loc36) [template = constants.%i32] -// CHECK:STDOUT: %.loc36_23.1: type = value_of_initializer %int.make_type_signed.loc36 [template = constants.%i32] -// CHECK:STDOUT: %.loc36_23.2: type = converted %int.make_type_signed.loc36, %.loc36_23.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc36: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %w.var: ref %i32 = var w // CHECK:STDOUT: %w: ref %i32 = bind_name w, %w.var // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc36: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc36: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc36: = bound_method %int_1, %impl.elem0.loc36 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc36: = specific_function %Convert.bound.loc36, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc36: init %i32 = call %Convert.specific_fn.loc36(%int_1) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc36_30: init %i32 = converted %int_1, %int.convert_checked.loc36 [template = constants.%int_1.2] -// CHECK:STDOUT: assign %w.var, %.loc36_30 +// CHECK:STDOUT: %.loc36: init %i32 = converted %int_1, %int.convert_checked.loc36 [template = constants.%int_1.2] +// CHECK:STDOUT: assign %w.var, %.loc36 // CHECK:STDOUT: br !if.else.loc29 // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc29: @@ -193,7 +179,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc27: // CHECK:STDOUT: %int_0.loc39: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc39: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc39: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc39: = bound_method %int_0.loc39, %impl.elem0.loc39 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc39: = specific_function %Convert.bound.loc39, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc39: init %i32 = call %Convert.specific_fn.loc39(%int_0.loc39) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/return/fail_returned_var_type.carbon b/toolchain/check/testdata/return/fail_returned_var_type.carbon index e85b320b72d7..90c2af009b35 100644 --- a/toolchain/check/testdata/return/fail_returned_var_type.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_type.carbon @@ -23,9 +23,7 @@ fn Mismatch() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Mismatch.type: type = fn_type @Mismatch [template] // CHECK:STDOUT: %Mismatch: %Mismatch.type = struct_value () [template] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] @@ -37,7 +35,7 @@ fn Mismatch() -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .Float = %import_ref.2 +// CHECK:STDOUT: .Float = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -54,9 +52,7 @@ fn Mismatch() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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_18.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_18.2: type = converted %int.make_type_signed, %.loc11_18.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/return/fail_type_mismatch.carbon b/toolchain/check/testdata/return/fail_type_mismatch.carbon index 912ed3a02c73..18290c361ebb 100644 --- a/toolchain/check/testdata/return/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/return/fail_type_mismatch.carbon @@ -22,9 +22,7 @@ fn Main() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %float: f64 = float_literal 1 [template] @@ -33,7 +31,7 @@ fn Main() -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -50,9 +48,7 @@ fn Main() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_signed, %.loc11_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/return/fail_value_missing.carbon b/toolchain/check/testdata/return/fail_value_missing.carbon index 96bef5e24bfe..8ef3a7fdd502 100644 --- a/toolchain/check/testdata/return/fail_value_missing.carbon +++ b/toolchain/check/testdata/return/fail_value_missing.carbon @@ -22,16 +22,14 @@ fn Main() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -48,9 +46,7 @@ fn Main() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_signed, %.loc11_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/return/fail_var_in_type.carbon b/toolchain/check/testdata/return/fail_var_in_type.carbon index 537ad558d3f6..f3017ae0bf27 100644 --- a/toolchain/check/testdata/return/fail_var_in_type.carbon +++ b/toolchain/check/testdata/return/fail_var_in_type.carbon @@ -18,9 +18,7 @@ fn Six() -> x { return 6; } // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Six.type: type = fn_type @Six [template] // CHECK:STDOUT: %Six: %Six.type = struct_value () [template] // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template] @@ -28,7 +26,7 @@ fn Six() -> x { return 6; } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -63,8 +61,8 @@ fn Six() -> x { return 6; } // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // 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: assign file.%x.var, %int.make_type_signed +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: assign file.%x.var, %i32 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/no_prelude/import_convert_function.carbon b/toolchain/check/testdata/return/no_prelude/import_convert_function.carbon index a58b729c2884..f8e8459d61f6 100644 --- a/toolchain/check/testdata/return/no_prelude/import_convert_function.carbon +++ b/toolchain/check/testdata/return/no_prelude/import_convert_function.carbon @@ -81,11 +81,11 @@ fn F0(n: i32) -> P.D { // 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, @ImplicitAs.%Convert.decl [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] -// CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(%i32.builtin)> [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2 [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] +// CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.1, @ImplicitAs(%i32.builtin) [template] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [template] // CHECK:STDOUT: %Convert.assoc_type.2: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.3 [template] // CHECK:STDOUT: %assoc0.2: %Convert.assoc_type.2 = assoc_entity element0, @ImplicitAs.%Convert.decl [template] @@ -135,10 +135,10 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc12_17.2: type = converted %int_literal.make_type, %.loc12_17.1 [template = Core.IntLiteral] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, file.%ImplicitAs.decl [template = constants.%ImplicitAs.generic] // 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: %.loc12_36.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_36.2: type = converted %int.make_type_signed, %.loc12_36.1 [template = constants.%i32] -// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%i32)> [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc12_36.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc12_36.2: type = converted %int.make_type_signed, %.loc12_36.1 [template = constants.%i32.builtin] +// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%i32.builtin)> [template = constants.%ImplicitAs.type.3] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -185,18 +185,18 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Convert.decl: %Convert.type.2 = fn_decl @Convert.2 [template = constants.%Convert.2] { // CHECK:STDOUT: %self.patt: Core.IntLiteral = binding_pattern self // CHECK:STDOUT: %self.param_patt: Core.IntLiteral = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: %i32.builtin = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %i32.builtin = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%.loc12_17.2 [template = Core.IntLiteral] // 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_31.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_31.2: type = converted %int.make_type_signed, %.loc13_31.1 [template = constants.%i32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc13_31.2: type = converted %int.make_type_signed, %.loc13_31.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %self.param: Core.IntLiteral = value_param runtime_param0 // CHECK:STDOUT: %self: Core.IntLiteral = bind_name self, %self.param -// CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %i32.builtin = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %interface: = interface_witness (%Convert.decl) [template = constants.%interface] // CHECK:STDOUT: @@ -218,7 +218,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self.as_type.loc9_20.1 (%Self.as_type)]() -> @Convert.1.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Convert.2[%self.param_patt: Core.IntLiteral]() -> %i32 = "int.convert_checked"; +// CHECK:STDOUT: fn @Convert.2[%self.param_patt: Core.IntLiteral]() -> %i32.builtin = "int.convert_checked"; // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%T) { // CHECK:STDOUT: %T.loc8_22.2 => constants.%T @@ -242,9 +242,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %T.patt.loc8_22.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%i32) { -// CHECK:STDOUT: %T.loc8_22.2 => constants.%i32 -// CHECK:STDOUT: %T.patt.loc8_22.2 => constants.%i32 +// CHECK:STDOUT: specific @ImplicitAs(constants.%i32.builtin) { +// CHECK:STDOUT: %T.loc8_22.2 => constants.%i32.builtin +// CHECK:STDOUT: %T.patt.loc8_22.2 => constants.%i32.builtin // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 @@ -255,8 +255,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %assoc0.loc9_32.2 => constants.%assoc0.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%i32, constants.%ImplicitAs.facet) { -// CHECK:STDOUT: %T => constants.%i32 +// CHECK:STDOUT: specific @Convert.1(constants.%i32.builtin, constants.%ImplicitAs.facet) { +// CHECK:STDOUT: %T => constants.%i32.builtin // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 // CHECK:STDOUT: %Self => constants.%ImplicitAs.facet // CHECK:STDOUT: %Self.as_type.loc9_20.1 => Core.IntLiteral @@ -268,17 +268,17 @@ fn F0(n: i32) -> P.D { // 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, %int_32 [template] -// CHECK:STDOUT: %N: %i32 = bind_symbolic_name N, 0 [symbolic] -// CHECK:STDOUT: %N.patt: %i32 = symbolic_binding_pattern N, 0 [symbolic] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %N: %i32.builtin = bind_symbolic_name N, 0 [symbolic] +// CHECK:STDOUT: %N.patt: %i32.builtin = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] // CHECK:STDOUT: %C.1: type = class_type @C, @C(%N) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %D.elem: type = unbound_element_type %D, %i32 [template] -// CHECK:STDOUT: %struct_type.n.m.1: type = struct_type {.n: %i32, .m: %i32} [template] +// CHECK:STDOUT: %D.elem: type = unbound_element_type %D, %i32.builtin [template] +// CHECK:STDOUT: %struct_type.n.m.1: type = struct_type {.n: %i32.builtin, .m: %i32.builtin} [template] // CHECK:STDOUT: %complete_type.2: = complete_type_witness %struct_type.n.m.1 [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %Make: %Make.type = struct_value () [template] @@ -295,8 +295,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [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.6 [symbolic] -// CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template] -// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] +// CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(%i32.builtin)> [template] +// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32.builtin) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] // CHECK:STDOUT: %Convert.assoc_type.2: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] // CHECK:STDOUT: %assoc0.2: %Convert.assoc_type.2 = assoc_entity element0, imports.%import_ref.6 [template] @@ -305,7 +305,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [template] // CHECK:STDOUT: %interface.1: = interface_witness (%Convert.3) [template] // CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.3 [template] -// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %int_0.2: %i32.builtin = int_value 0 [template] // CHECK:STDOUT: %D.val: %D = struct_value (%int_0.2, %int_0.2) [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%int_0.2) [template] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%D)> [template] @@ -319,7 +319,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %interface.2: = interface_witness (%Convert.4) [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.3 [template] -// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_1.2: %i32.builtin = int_value 1 [template] // CHECK:STDOUT: %C.3: type = class_type @C, @C(%int_1.2) [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.4 [template] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [template] @@ -327,7 +327,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %interface.3: = interface_witness (%Convert.6) [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.3 [template] -// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] +// CHECK:STDOUT: %int_2.2: %i32.builtin = int_value 2 [template] // CHECK:STDOUT: %C.4: type = class_type @C, @C(%int_2.2) [template] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.5 [template] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [template] @@ -335,7 +335,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %interface.4: = interface_witness (%Convert.7) [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %Convert.bound.4: = bound_method %int_3.1, %Convert.3 [template] -// CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] +// CHECK:STDOUT: %int_3.2: %i32.builtin = int_value 3 [template] // CHECK:STDOUT: %C.5: type = class_type @C, @C(%int_3.2) [template] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.6 [template] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [template] @@ -343,7 +343,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %interface.5: = interface_witness (%Convert.8) [template] // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] // CHECK:STDOUT: %Convert.bound.5: = bound_method %int_4.1, %Convert.3 [template] -// CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] +// CHECK:STDOUT: %int_4.2: %i32.builtin = int_value 4 [template] // CHECK:STDOUT: %C.6: type = class_type @C, @C(%int_4.2) [template] // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.7 [template] // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [template] @@ -351,7 +351,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %interface.6: = interface_witness (%Convert.9) [template] // CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] // CHECK:STDOUT: %Convert.bound.6: = bound_method %int_5.1, %Convert.3 [template] -// CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] +// CHECK:STDOUT: %int_5.2: %i32.builtin = int_value 5 [template] // CHECK:STDOUT: %C.7: type = class_type @C, @C(%int_5.2) [template] // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.8 [template] // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] @@ -359,7 +359,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %interface.7: = interface_witness (%Convert.10) [template] // CHECK:STDOUT: %int_6.1: Core.IntLiteral = int_value 6 [template] // CHECK:STDOUT: %Convert.bound.7: = bound_method %int_6.1, %Convert.3 [template] -// CHECK:STDOUT: %int_6.2: %i32 = int_value 6 [template] +// CHECK:STDOUT: %int_6.2: %i32.builtin = int_value 6 [template] // CHECK:STDOUT: %C.8: type = class_type @C, @C(%int_6.2) [template] // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.9 [template] // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] @@ -367,7 +367,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %interface.8: = interface_witness (%Convert.11) [template] // CHECK:STDOUT: %int_7.1: Core.IntLiteral = int_value 7 [template] // CHECK:STDOUT: %Convert.bound.8: = bound_method %int_7.1, %Convert.3 [template] -// CHECK:STDOUT: %int_7.2: %i32 = int_value 7 [template] +// CHECK:STDOUT: %int_7.2: %i32.builtin = int_value 7 [template] // CHECK:STDOUT: %C.9: type = class_type @C, @C(%int_7.2) [template] // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10 [template] // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [template] @@ -400,15 +400,15 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] { -// CHECK:STDOUT: %N.patt.loc6_9.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_9.2 (constants.%N.patt)] -// CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc6_9.1, runtime_param [symbolic = %N.patt.loc6_9.2 (constants.%N.patt)] +// CHECK:STDOUT: %N.patt.loc6_9.1: %i32.builtin = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_9.2 (constants.%N.patt)] +// CHECK:STDOUT: %N.param_patt: %i32.builtin = value_param_pattern %N.patt.loc6_9.1, runtime_param [symbolic = %N.patt.loc6_9.2 (constants.%N.patt)] // CHECK:STDOUT: } { // 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: %.loc6_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc6_13.2: type = converted %int.make_type_signed, %.loc6_13.1 [template = constants.%i32] -// CHECK:STDOUT: %N.param: %i32 = value_param runtime_param -// CHECK:STDOUT: %N.loc6_9.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc6_9.2 (constants.%N)] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc6_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc6_13.2: type = converted %int.make_type_signed, %.loc6_13.1 [template = constants.%i32.builtin] +// CHECK:STDOUT: %N.param: %i32.builtin = value_param runtime_param +// CHECK:STDOUT: %N.loc6_9.1: %i32.builtin = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc6_9.2 (constants.%N)] // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} {} // CHECK:STDOUT: %Make.decl: %Make.type = fn_decl @Make [template = constants.%Make] { @@ -424,9 +424,9 @@ fn F0(n: i32) -> P.D { // 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.1, element0 [template = constants.%Convert.3] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.bound(%int_0) [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc10_9.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc10_9.2: %i32 = converted %int_0, %.loc10_9.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.convert_checked: init %i32.builtin = call %Convert.bound(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc10_9.1: %i32.builtin = value_of_initializer %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc10_9.2: %i32.builtin = converted %int_0, %.loc10_9.1 [template = constants.%int_0.2] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%int_0.2) [template = constants.%C.2] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs.generic] @@ -438,9 +438,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.bound(%int_1) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc11_9.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc11_9.2: %i32 = converted %int_1, %.loc11_9.1 [template = constants.%int_1.2] +// CHECK:STDOUT: %int.convert_checked: init %i32.builtin = call %Convert.bound(%int_1) [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_9.1: %i32.builtin = value_of_initializer %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: %.loc11_9.2: %i32.builtin = converted %int_1, %.loc11_9.1 [template = constants.%int_1.2] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%int_1.2) [template = constants.%C.3] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs.generic] @@ -452,9 +452,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2, %impl.elem0 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.bound(%int_2) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc12_9.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc12_9.2: %i32 = converted %int_2, %.loc12_9.1 [template = constants.%int_2.2] +// CHECK:STDOUT: %int.convert_checked: init %i32.builtin = call %Convert.bound(%int_2) [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc12_9.1: %i32.builtin = value_of_initializer %int.convert_checked [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc12_9.2: %i32.builtin = converted %int_2, %.loc12_9.1 [template = constants.%int_2.2] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%int_2.2) [template = constants.%C.4] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs.generic] @@ -466,9 +466,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] // CHECK:STDOUT: %Convert.bound: = bound_method %int_3, %impl.elem0 [template = constants.%Convert.bound.4] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.bound(%int_3) [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc13_9.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc13_9.2: %i32 = converted %int_3, %.loc13_9.1 [template = constants.%int_3.2] +// CHECK:STDOUT: %int.convert_checked: init %i32.builtin = call %Convert.bound(%int_3) [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc13_9.1: %i32.builtin = value_of_initializer %int.convert_checked [template = constants.%int_3.2] +// CHECK:STDOUT: %.loc13_9.2: %i32.builtin = converted %int_3, %.loc13_9.1 [template = constants.%int_3.2] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%int_3.2) [template = constants.%C.5] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs.generic] @@ -480,9 +480,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] // CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] // CHECK:STDOUT: %Convert.bound: = bound_method %int_4, %impl.elem0 [template = constants.%Convert.bound.5] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.bound(%int_4) [template = constants.%int_4.2] -// CHECK:STDOUT: %.loc14_9.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_4.2] -// CHECK:STDOUT: %.loc14_9.2: %i32 = converted %int_4, %.loc14_9.1 [template = constants.%int_4.2] +// CHECK:STDOUT: %int.convert_checked: init %i32.builtin = call %Convert.bound(%int_4) [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc14_9.1: %i32.builtin = value_of_initializer %int.convert_checked [template = constants.%int_4.2] +// CHECK:STDOUT: %.loc14_9.2: %i32.builtin = converted %int_4, %.loc14_9.1 [template = constants.%int_4.2] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%int_4.2) [template = constants.%C.6] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs.generic] @@ -494,9 +494,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] // CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] // CHECK:STDOUT: %Convert.bound: = bound_method %int_5, %impl.elem0 [template = constants.%Convert.bound.6] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.bound(%int_5) [template = constants.%int_5.2] -// CHECK:STDOUT: %.loc15_9.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_5.2] -// CHECK:STDOUT: %.loc15_9.2: %i32 = converted %int_5, %.loc15_9.1 [template = constants.%int_5.2] +// CHECK:STDOUT: %int.convert_checked: init %i32.builtin = call %Convert.bound(%int_5) [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc15_9.1: %i32.builtin = value_of_initializer %int.convert_checked [template = constants.%int_5.2] +// CHECK:STDOUT: %.loc15_9.2: %i32.builtin = converted %int_5, %.loc15_9.1 [template = constants.%int_5.2] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%int_5.2) [template = constants.%C.7] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs.generic] @@ -508,9 +508,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.1] // CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] // CHECK:STDOUT: %Convert.bound: = bound_method %int_6, %impl.elem0 [template = constants.%Convert.bound.7] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.bound(%int_6) [template = constants.%int_6.2] -// CHECK:STDOUT: %.loc16_9.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_6.2] -// CHECK:STDOUT: %.loc16_9.2: %i32 = converted %int_6, %.loc16_9.1 [template = constants.%int_6.2] +// CHECK:STDOUT: %int.convert_checked: init %i32.builtin = call %Convert.bound(%int_6) [template = constants.%int_6.2] +// CHECK:STDOUT: %.loc16_9.1: %i32.builtin = value_of_initializer %int.convert_checked [template = constants.%int_6.2] +// CHECK:STDOUT: %.loc16_9.2: %i32.builtin = converted %int_6, %.loc16_9.1 [template = constants.%int_6.2] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%int_6.2) [template = constants.%C.8] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs.generic] @@ -522,9 +522,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [template = constants.%int_7.1] // CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] // CHECK:STDOUT: %Convert.bound: = bound_method %int_7, %impl.elem0 [template = constants.%Convert.bound.8] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.bound(%int_7) [template = constants.%int_7.2] -// CHECK:STDOUT: %.loc17_9.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_7.2] -// CHECK:STDOUT: %.loc17_9.2: %i32 = converted %int_7, %.loc17_9.1 [template = constants.%int_7.2] +// CHECK:STDOUT: %int.convert_checked: init %i32.builtin = call %Convert.bound(%int_7) [template = constants.%int_7.2] +// CHECK:STDOUT: %.loc17_9.1: %i32.builtin = value_of_initializer %int.convert_checked [template = constants.%int_7.2] +// CHECK:STDOUT: %.loc17_9.2: %i32.builtin = converted %int_7, %.loc17_9.1 [template = constants.%int_7.2] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%int_7.2) [template = constants.%C.9] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs.generic] @@ -726,9 +726,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: witness = %interface // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(%N.loc6_9.1: %i32) { -// CHECK:STDOUT: %N.loc6_9.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc6_9.2 (constants.%N)] -// CHECK:STDOUT: %N.patt.loc6_9.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_9.2 (constants.%N.patt)] +// CHECK:STDOUT: generic class @C(%N.loc6_9.1: %i32.builtin) { +// CHECK:STDOUT: %N.loc6_9.2: %i32.builtin = bind_symbolic_name N, 0 [symbolic = %N.loc6_9.2 (constants.%N)] +// CHECK:STDOUT: %N.patt.loc6_9.2: %i32.builtin = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_9.2 (constants.%N.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -743,14 +743,14 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: // CHECK:STDOUT: class @D { // CHECK:STDOUT: %int_32.loc7_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_18: init type = call constants.%Int(%int_32.loc7_18) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_18.1: type = value_of_initializer %int.make_type_signed.loc7_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_18.2: type = converted %int.make_type_signed.loc7_18, %.loc7_18.1 [template = constants.%i32] +// CHECK:STDOUT: %int.make_type_signed.loc7_18: init type = call constants.%Int(%int_32.loc7_18) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc7_18.1: type = value_of_initializer %int.make_type_signed.loc7_18 [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc7_18.2: type = converted %int.make_type_signed.loc7_18, %.loc7_18.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %.loc7_16: %D.elem = field_decl n, element0 [template] // CHECK:STDOUT: %int_32.loc7_30: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_30: init type = call constants.%Int(%int_32.loc7_30) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_30.1: type = value_of_initializer %int.make_type_signed.loc7_30 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_30.2: type = converted %int.make_type_signed.loc7_30, %.loc7_30.1 [template = constants.%i32] +// CHECK:STDOUT: %int.make_type_signed.loc7_30: init type = call constants.%Int(%int_32.loc7_30) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc7_30.1: type = value_of_initializer %int.make_type_signed.loc7_30 [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc7_30.2: type = converted %int.make_type_signed.loc7_30, %.loc7_30.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %.loc7_28: %D.elem = field_decl m, element1 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n.m.1 [template = constants.%complete_type.2] // CHECK:STDOUT: @@ -770,16 +770,16 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc8_40.1: %struct_type.n.m.2 = struct_literal (%int_0.loc8_31, %int_0.loc8_39) // CHECK:STDOUT: %impl.elem0.loc8_40.1: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] // CHECK:STDOUT: %Convert.bound.loc8_40.1: = bound_method %int_0.loc8_31, %impl.elem0.loc8_40.1 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %int.convert_checked.loc8_40.1: init %i32 = call %Convert.bound.loc8_40.1(%int_0.loc8_31) [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc8_40.2: init %i32 = converted %int_0.loc8_31, %int.convert_checked.loc8_40.1 [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc8_40.3: ref %i32 = class_element_access %return, element0 -// CHECK:STDOUT: %.loc8_40.4: init %i32 = initialize_from %.loc8_40.2 to %.loc8_40.3 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.convert_checked.loc8_40.1: init %i32.builtin = call %Convert.bound.loc8_40.1(%int_0.loc8_31) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc8_40.2: init %i32.builtin = converted %int_0.loc8_31, %int.convert_checked.loc8_40.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc8_40.3: ref %i32.builtin = class_element_access %return, element0 +// CHECK:STDOUT: %.loc8_40.4: init %i32.builtin = initialize_from %.loc8_40.2 to %.loc8_40.3 [template = constants.%int_0.2] // CHECK:STDOUT: %impl.elem0.loc8_40.2: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] // CHECK:STDOUT: %Convert.bound.loc8_40.2: = bound_method %int_0.loc8_39, %impl.elem0.loc8_40.2 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %int.convert_checked.loc8_40.2: init %i32 = call %Convert.bound.loc8_40.2(%int_0.loc8_39) [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc8_40.5: init %i32 = converted %int_0.loc8_39, %int.convert_checked.loc8_40.2 [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc8_40.6: ref %i32 = class_element_access %return, element1 -// CHECK:STDOUT: %.loc8_40.7: init %i32 = initialize_from %.loc8_40.5 to %.loc8_40.6 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.convert_checked.loc8_40.2: init %i32.builtin = call %Convert.bound.loc8_40.2(%int_0.loc8_39) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc8_40.5: init %i32.builtin = converted %int_0.loc8_39, %int.convert_checked.loc8_40.2 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc8_40.6: ref %i32.builtin = class_element_access %return, element1 +// CHECK:STDOUT: %.loc8_40.7: init %i32.builtin = initialize_from %.loc8_40.5 to %.loc8_40.6 [template = constants.%int_0.2] // CHECK:STDOUT: %.loc8_40.8: init %D = class_init (%.loc8_40.4, %.loc8_40.7), %return [template = constants.%D.val] // CHECK:STDOUT: %.loc8_41: init %D = converted %.loc8_40.1, %.loc8_40.8 [template = constants.%D.val] // CHECK:STDOUT: return %.loc8_41 to %return @@ -794,7 +794,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self.as_type (%Self.as_type)]() -> @Convert.1.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Convert.2[%self.param_patt: Core.IntLiteral]() -> %i32 = "int.convert_checked" [from "core.carbon"]; +// CHECK:STDOUT: fn @Convert.2[%self.param_patt: Core.IntLiteral]() -> %i32.builtin = "int.convert_checked" [from "core.carbon"]; // CHECK:STDOUT: // CHECK:STDOUT: fn @Convert.3[%self.param_patt: %C.2]() -> %return.param_patt: %D { // CHECK:STDOUT: !entry: @@ -887,9 +887,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%i32) { -// CHECK:STDOUT: %T => constants.%i32 -// CHECK:STDOUT: %T.patt => constants.%i32 +// CHECK:STDOUT: specific @ImplicitAs(constants.%i32.builtin) { +// CHECK:STDOUT: %T => constants.%i32.builtin +// CHECK:STDOUT: %T.patt => constants.%i32.builtin // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 @@ -1031,9 +1031,9 @@ fn F0(n: i32) -> P.D { // 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, %int_32 [template] +// CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] // CHECK:STDOUT: %D: type = class_type @D [template] -// CHECK:STDOUT: %struct_type.n.m: type = struct_type {.n: %i32, .m: %i32} [template] +// CHECK:STDOUT: %struct_type.n.m: type = struct_type {.n: %i32.builtin, .m: %i32.builtin} [template] // CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.n.m [template] // CHECK:STDOUT: %F0.type: type = fn_type @F0 [template] // CHECK:STDOUT: %F0: %F0.type = struct_value () [template] @@ -1042,8 +1042,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] // CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] -// CHECK:STDOUT: %N: %i32 = bind_symbolic_name N, 0 [symbolic] -// CHECK:STDOUT: %N.patt: %i32 = symbolic_binding_pattern N, 0 [symbolic] +// CHECK:STDOUT: %N: %i32.builtin = bind_symbolic_name N, 0 [symbolic] +// CHECK:STDOUT: %N.patt: %i32.builtin = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.2: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic] @@ -1054,8 +1054,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [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.14 [symbolic] -// CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template] -// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] +// CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(%i32.builtin)> [template] +// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32.builtin) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] // CHECK:STDOUT: %Convert.assoc_type.2: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] // CHECK:STDOUT: %assoc0.2: %Convert.assoc_type.2 = assoc_entity element0, imports.%import_ref.14 [template] @@ -1064,7 +1064,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [template] // CHECK:STDOUT: %interface.1: = interface_witness (%Convert.3) [template] // CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.3 [template] -// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %int_0.2: %i32.builtin = int_value 0 [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%int_0.2) [template] // CHECK:STDOUT: %C.val.1: %C.2 = struct_value () [template] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%D)> [template] @@ -1072,19 +1072,19 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [template] // CHECK:STDOUT: %Convert.assoc_type.3: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.4 [template] // CHECK:STDOUT: %assoc0.4: %Convert.assoc_type.3 = assoc_entity element0, imports.%import_ref.14 [template] -// CHECK:STDOUT: %int_1.1: %i32 = int_value 1 [template] +// CHECK:STDOUT: %int_1.1: %i32.builtin = int_value 1 [template] // CHECK:STDOUT: %C.3: type = class_type @C, @C(%int_1.1) [template] -// CHECK:STDOUT: %int_2.1: %i32 = int_value 2 [template] +// CHECK:STDOUT: %int_2.1: %i32.builtin = int_value 2 [template] // CHECK:STDOUT: %C.4: type = class_type @C, @C(%int_2.1) [template] -// CHECK:STDOUT: %int_3.1: %i32 = int_value 3 [template] +// CHECK:STDOUT: %int_3.1: %i32.builtin = int_value 3 [template] // CHECK:STDOUT: %C.5: type = class_type @C, @C(%int_3.1) [template] -// CHECK:STDOUT: %int_4.1: %i32 = int_value 4 [template] +// CHECK:STDOUT: %int_4.1: %i32.builtin = int_value 4 [template] // CHECK:STDOUT: %C.6: type = class_type @C, @C(%int_4.1) [template] -// CHECK:STDOUT: %int_5.1: %i32 = int_value 5 [template] +// CHECK:STDOUT: %int_5.1: %i32.builtin = int_value 5 [template] // CHECK:STDOUT: %C.7: type = class_type @C, @C(%int_5.1) [template] -// CHECK:STDOUT: %int_6.1: %i32 = int_value 6 [template] +// CHECK:STDOUT: %int_6.1: %i32.builtin = int_value 6 [template] // CHECK:STDOUT: %C.8: type = class_type @C, @C(%int_6.1) [template] -// CHECK:STDOUT: %int_7.1: %i32 = int_value 7 [template] +// CHECK:STDOUT: %int_7.1: %i32.builtin = int_value 7 [template] // CHECK:STDOUT: %C.9: type = class_type @C, @C(%int_7.1) [template] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.3 [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] @@ -1198,19 +1198,19 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %P.import = import P // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F0.decl: %F0.type = fn_decl @F0 [template = constants.%F0] { -// CHECK:STDOUT: %n.patt: %i32 = binding_pattern n -// CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0 +// CHECK:STDOUT: %n.patt: %i32.builtin = binding_pattern n +// CHECK:STDOUT: %n.param_patt: %i32.builtin = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %D = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %D = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // 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: %.loc7_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc7_10.2: type = converted %int.make_type_signed, %.loc7_10.1 [template = constants.%i32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc7_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc7_10.2: type = converted %int.make_type_signed, %.loc7_10.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %P.ref.loc7: = name_ref P, imports.%P [template = imports.%P] // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.2 [template = constants.%D] -// CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 -// CHECK:STDOUT: %n: %i32 = bind_name n, %n.param +// CHECK:STDOUT: %n.param: %i32.builtin = value_param runtime_param0 +// CHECK:STDOUT: %n: %i32.builtin = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } @@ -1289,9 +1289,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: complete_type_witness = imports.%import_ref.3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(constants.%N: %i32) [from "library.carbon"] { -// CHECK:STDOUT: %N: %i32 = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)] -// CHECK:STDOUT: %N.patt: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)] +// CHECK:STDOUT: generic class @C(constants.%N: %i32.builtin) [from "library.carbon"] { +// CHECK:STDOUT: %N: %i32.builtin = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)] +// CHECK:STDOUT: %N.patt: %i32.builtin = symbolic_binding_pattern N, 0 [symbolic = %N.patt (constants.%N.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -1304,7 +1304,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int(%N.param_patt: Core.IntLiteral) -> type = "int.make_type_signed" [from "core.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F0(%n.param_patt: %i32) -> %return.param_patt: %D { +// CHECK:STDOUT: fn @F0(%n.param_patt: %i32.builtin) -> %return.param_patt: %D { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %false.loc8: bool = bool_literal false [template = constants.%false] // CHECK:STDOUT: if %false.loc8 br !if.then.loc8 else br !if.else.loc8 @@ -1316,9 +1316,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %impl.elem0.loc8_34: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] // CHECK:STDOUT: %Convert.bound.loc8_34: = bound_method %int_0, %impl.elem0.loc8_34 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %Convert.bound.loc8_34(%int_0) [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc8_34.1: %i32 = value_of_initializer %int.convert_checked.loc8 [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc8_34.2: %i32 = converted %int_0, %.loc8_34.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %int.convert_checked.loc8: init %i32.builtin = call %Convert.bound.loc8_34(%int_0) [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc8_34.1: %i32.builtin = value_of_initializer %int.convert_checked.loc8 [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc8_34.2: %i32.builtin = converted %int_0, %.loc8_34.1 [template = constants.%int_0.2] // CHECK:STDOUT: %C.loc8: type = class_type @C, @C(constants.%int_0.2) [template = constants.%C.2] // CHECK:STDOUT: %.loc8_24.2: ref %C.2 = temporary_storage // CHECK:STDOUT: %.loc8_24.3: init %C.2 = class_init (), %.loc8_24.2 [template = constants.%C.val.1] @@ -1343,9 +1343,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.2] // CHECK:STDOUT: %impl.elem0.loc9_34: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] // CHECK:STDOUT: %Convert.bound.loc9_34: = bound_method %int_1, %impl.elem0.loc9_34 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %Convert.bound.loc9_34(%int_1) [template = constants.%int_1.1] -// CHECK:STDOUT: %.loc9_34.1: %i32 = value_of_initializer %int.convert_checked.loc9 [template = constants.%int_1.1] -// CHECK:STDOUT: %.loc9_34.2: %i32 = converted %int_1, %.loc9_34.1 [template = constants.%int_1.1] +// CHECK:STDOUT: %int.convert_checked.loc9: init %i32.builtin = call %Convert.bound.loc9_34(%int_1) [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc9_34.1: %i32.builtin = value_of_initializer %int.convert_checked.loc9 [template = constants.%int_1.1] +// CHECK:STDOUT: %.loc9_34.2: %i32.builtin = converted %int_1, %.loc9_34.1 [template = constants.%int_1.1] // CHECK:STDOUT: %C.loc9: type = class_type @C, @C(constants.%int_1.1) [template = constants.%C.3] // CHECK:STDOUT: %.loc9_24.2: ref %C.3 = temporary_storage // CHECK:STDOUT: %.loc9_24.3: init %C.3 = class_init (), %.loc9_24.2 [template = constants.%C.val.2] @@ -1370,9 +1370,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.2] // CHECK:STDOUT: %impl.elem0.loc10_34: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] // CHECK:STDOUT: %Convert.bound.loc10_34: = bound_method %int_2, %impl.elem0.loc10_34 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %int.convert_checked.loc10: init %i32 = call %Convert.bound.loc10_34(%int_2) [template = constants.%int_2.1] -// CHECK:STDOUT: %.loc10_34.1: %i32 = value_of_initializer %int.convert_checked.loc10 [template = constants.%int_2.1] -// CHECK:STDOUT: %.loc10_34.2: %i32 = converted %int_2, %.loc10_34.1 [template = constants.%int_2.1] +// CHECK:STDOUT: %int.convert_checked.loc10: init %i32.builtin = call %Convert.bound.loc10_34(%int_2) [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc10_34.1: %i32.builtin = value_of_initializer %int.convert_checked.loc10 [template = constants.%int_2.1] +// CHECK:STDOUT: %.loc10_34.2: %i32.builtin = converted %int_2, %.loc10_34.1 [template = constants.%int_2.1] // CHECK:STDOUT: %C.loc10: type = class_type @C, @C(constants.%int_2.1) [template = constants.%C.4] // CHECK:STDOUT: %.loc10_24.2: ref %C.4 = temporary_storage // CHECK:STDOUT: %.loc10_24.3: init %C.4 = class_init (), %.loc10_24.2 [template = constants.%C.val.3] @@ -1397,9 +1397,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.2] // CHECK:STDOUT: %impl.elem0.loc11_34: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] // CHECK:STDOUT: %Convert.bound.loc11_34: = bound_method %int_3, %impl.elem0.loc11_34 [template = constants.%Convert.bound.4] -// CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %Convert.bound.loc11_34(%int_3) [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc11_34.1: %i32 = value_of_initializer %int.convert_checked.loc11 [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc11_34.2: %i32 = converted %int_3, %.loc11_34.1 [template = constants.%int_3.1] +// CHECK:STDOUT: %int.convert_checked.loc11: init %i32.builtin = call %Convert.bound.loc11_34(%int_3) [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc11_34.1: %i32.builtin = value_of_initializer %int.convert_checked.loc11 [template = constants.%int_3.1] +// CHECK:STDOUT: %.loc11_34.2: %i32.builtin = converted %int_3, %.loc11_34.1 [template = constants.%int_3.1] // CHECK:STDOUT: %C.loc11: type = class_type @C, @C(constants.%int_3.1) [template = constants.%C.5] // CHECK:STDOUT: %.loc11_24.2: ref %C.5 = temporary_storage // CHECK:STDOUT: %.loc11_24.3: init %C.5 = class_init (), %.loc11_24.2 [template = constants.%C.val.4] @@ -1424,9 +1424,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.2] // CHECK:STDOUT: %impl.elem0.loc12_34: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] // CHECK:STDOUT: %Convert.bound.loc12_34: = bound_method %int_4, %impl.elem0.loc12_34 [template = constants.%Convert.bound.5] -// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %Convert.bound.loc12_34(%int_4) [template = constants.%int_4.1] -// CHECK:STDOUT: %.loc12_34.1: %i32 = value_of_initializer %int.convert_checked.loc12 [template = constants.%int_4.1] -// CHECK:STDOUT: %.loc12_34.2: %i32 = converted %int_4, %.loc12_34.1 [template = constants.%int_4.1] +// CHECK:STDOUT: %int.convert_checked.loc12: init %i32.builtin = call %Convert.bound.loc12_34(%int_4) [template = constants.%int_4.1] +// CHECK:STDOUT: %.loc12_34.1: %i32.builtin = value_of_initializer %int.convert_checked.loc12 [template = constants.%int_4.1] +// CHECK:STDOUT: %.loc12_34.2: %i32.builtin = converted %int_4, %.loc12_34.1 [template = constants.%int_4.1] // CHECK:STDOUT: %C.loc12: type = class_type @C, @C(constants.%int_4.1) [template = constants.%C.6] // CHECK:STDOUT: %.loc12_24.2: ref %C.6 = temporary_storage // CHECK:STDOUT: %.loc12_24.3: init %C.6 = class_init (), %.loc12_24.2 [template = constants.%C.val.5] @@ -1451,9 +1451,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.2] // CHECK:STDOUT: %impl.elem0.loc13_34: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] // CHECK:STDOUT: %Convert.bound.loc13_34: = bound_method %int_5, %impl.elem0.loc13_34 [template = constants.%Convert.bound.6] -// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %Convert.bound.loc13_34(%int_5) [template = constants.%int_5.1] -// CHECK:STDOUT: %.loc13_34.1: %i32 = value_of_initializer %int.convert_checked.loc13 [template = constants.%int_5.1] -// CHECK:STDOUT: %.loc13_34.2: %i32 = converted %int_5, %.loc13_34.1 [template = constants.%int_5.1] +// CHECK:STDOUT: %int.convert_checked.loc13: init %i32.builtin = call %Convert.bound.loc13_34(%int_5) [template = constants.%int_5.1] +// CHECK:STDOUT: %.loc13_34.1: %i32.builtin = value_of_initializer %int.convert_checked.loc13 [template = constants.%int_5.1] +// CHECK:STDOUT: %.loc13_34.2: %i32.builtin = converted %int_5, %.loc13_34.1 [template = constants.%int_5.1] // CHECK:STDOUT: %C.loc13: type = class_type @C, @C(constants.%int_5.1) [template = constants.%C.7] // CHECK:STDOUT: %.loc13_24.2: ref %C.7 = temporary_storage // CHECK:STDOUT: %.loc13_24.3: init %C.7 = class_init (), %.loc13_24.2 [template = constants.%C.val.6] @@ -1478,9 +1478,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.2] // CHECK:STDOUT: %impl.elem0.loc14_34: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] // CHECK:STDOUT: %Convert.bound.loc14_34: = bound_method %int_6, %impl.elem0.loc14_34 [template = constants.%Convert.bound.7] -// CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %Convert.bound.loc14_34(%int_6) [template = constants.%int_6.1] -// CHECK:STDOUT: %.loc14_34.1: %i32 = value_of_initializer %int.convert_checked.loc14 [template = constants.%int_6.1] -// CHECK:STDOUT: %.loc14_34.2: %i32 = converted %int_6, %.loc14_34.1 [template = constants.%int_6.1] +// CHECK:STDOUT: %int.convert_checked.loc14: init %i32.builtin = call %Convert.bound.loc14_34(%int_6) [template = constants.%int_6.1] +// CHECK:STDOUT: %.loc14_34.1: %i32.builtin = value_of_initializer %int.convert_checked.loc14 [template = constants.%int_6.1] +// CHECK:STDOUT: %.loc14_34.2: %i32.builtin = converted %int_6, %.loc14_34.1 [template = constants.%int_6.1] // CHECK:STDOUT: %C.loc14: type = class_type @C, @C(constants.%int_6.1) [template = constants.%C.8] // CHECK:STDOUT: %.loc14_24.2: ref %C.8 = temporary_storage // CHECK:STDOUT: %.loc14_24.3: init %C.8 = class_init (), %.loc14_24.2 [template = constants.%C.val.7] @@ -1505,9 +1505,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [template = constants.%int_7.2] // CHECK:STDOUT: %impl.elem0.loc15_34: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.3] // CHECK:STDOUT: %Convert.bound.loc15_34: = bound_method %int_7, %impl.elem0.loc15_34 [template = constants.%Convert.bound.8] -// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %Convert.bound.loc15_34(%int_7) [template = constants.%int_7.1] -// CHECK:STDOUT: %.loc15_34.1: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%int_7.1] -// CHECK:STDOUT: %.loc15_34.2: %i32 = converted %int_7, %.loc15_34.1 [template = constants.%int_7.1] +// CHECK:STDOUT: %int.convert_checked.loc15: init %i32.builtin = call %Convert.bound.loc15_34(%int_7) [template = constants.%int_7.1] +// CHECK:STDOUT: %.loc15_34.1: %i32.builtin = value_of_initializer %int.convert_checked.loc15 [template = constants.%int_7.1] +// CHECK:STDOUT: %.loc15_34.2: %i32.builtin = converted %int_7, %.loc15_34.1 [template = constants.%int_7.1] // CHECK:STDOUT: %C.loc15: type = class_type @C, @C(constants.%int_7.1) [template = constants.%C.9] // CHECK:STDOUT: %.loc15_24.2: ref %C.9 = temporary_storage // CHECK:STDOUT: %.loc15_24.3: init %C.9 = class_init (), %.loc15_24.2 [template = constants.%C.val.8] @@ -1538,7 +1538,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self.as_type (%Self.as_type)]() -> @Convert.1.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Convert.2[%self.param_patt: Core.IntLiteral]() -> %i32 = "int.convert_checked" [from "core.carbon"]; +// CHECK:STDOUT: fn @Convert.2[%self.param_patt: Core.IntLiteral]() -> %i32.builtin = "int.convert_checked" [from "core.carbon"]; // CHECK:STDOUT: // CHECK:STDOUT: fn @Convert.3[%self.param_patt: %C.2]() -> %D [from "library.carbon"]; // CHECK:STDOUT: @@ -1585,9 +1585,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%i32) { -// CHECK:STDOUT: %T => constants.%i32 -// CHECK:STDOUT: %T.patt => constants.%i32 +// CHECK:STDOUT: specific @ImplicitAs(constants.%i32.builtin) { +// CHECK:STDOUT: %T => constants.%i32.builtin +// CHECK:STDOUT: %T.patt => constants.%i32.builtin // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 diff --git a/toolchain/check/testdata/return/returned_var.carbon b/toolchain/check/testdata/return/returned_var.carbon index f59d3fe2a4ef..6e0bae13ebf1 100644 --- a/toolchain/check/testdata/return/returned_var.carbon +++ b/toolchain/check/testdata/return/returned_var.carbon @@ -28,32 +28,30 @@ fn G() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %i32 [template] // CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %struct_type.a.b.1 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.a.b.1 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %C.val: %C = struct_value (%int_1.2, %int_2.2) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -61,7 +59,7 @@ fn G() -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -89,9 +87,7 @@ fn G() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_11.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_11.2: type = converted %int.make_type_signed.loc21, %.loc21_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -99,21 +95,17 @@ fn G() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: class @C { // 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: %.loc12_8: %C.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12: %C.elem = field_decl a, element0 [template] // 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_10.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_10.2: type = converted %int.make_type_signed.loc13, %.loc13_10.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8: %C.elem = field_decl b, element1 [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type.1] +// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc13: %C.elem = field_decl b, element1 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: .a = %.loc12_8 -// CHECK:STDOUT: .b = %.loc13_8 +// CHECK:STDOUT: .a = %.loc12 +// CHECK:STDOUT: .b = %.loc13 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -124,14 +116,14 @@ fn G() -> i32 { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc17_43.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc17_43.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc17_43.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc17_43.1: = bound_method %int_1, %impl.elem0.loc17_43.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc17_43.1: = specific_function %Convert.bound.loc17_43.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc17_43.1: init %i32 = call %Convert.specific_fn.loc17_43.1(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc17_43.2: init %i32 = converted %int_1, %int.convert_checked.loc17_43.1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc17_43.3: ref %i32 = class_element_access %return, element0 // CHECK:STDOUT: %.loc17_43.4: init %i32 = initialize_from %.loc17_43.2 to %.loc17_43.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc17_43.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc17_43.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc17_43.2: = bound_method %int_2, %impl.elem0.loc17_43.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc17_43.2: = specific_function %Convert.bound.loc17_43.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc17_43.2: init %i32 = call %Convert.specific_fn.loc17_43.2(%int_2) [template = constants.%int_2.2] @@ -147,13 +139,11 @@ fn G() -> i32 { // CHECK:STDOUT: fn @G() -> %i32 { // CHECK:STDOUT: !entry: // 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_24.1: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] -// CHECK:STDOUT: %.loc22_24.2: type = converted %int.make_type_signed.loc22, %.loc22_24.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %result.var: ref %i32 = var result // CHECK:STDOUT: %result: ref %i32 = bind_name result, %result.var // 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: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/return/returned_var_scope.carbon b/toolchain/check/testdata/return/returned_var_scope.carbon index 15a216fde235..6776faa597e0 100644 --- a/toolchain/check/testdata/return/returned_var_scope.carbon +++ b/toolchain/check/testdata/return/returned_var_scope.carbon @@ -31,22 +31,20 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %UnrelatedScopes.type: type = fn_type @UnrelatedScopes [template] // CHECK:STDOUT: %UnrelatedScopes: %UnrelatedScopes.type = struct_value () [template] // CHECK:STDOUT: %true: bool = bool_literal true [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] @@ -58,8 +56,8 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 -// CHECK:STDOUT: .Bool = %import_ref.38 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 +// CHECK:STDOUT: .Bool = %import_ref.193 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -77,9 +75,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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_25.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.2: type = converted %int.make_type_signed.loc11, %.loc11_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -93,9 +89,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %.loc21_25.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc21_25.2: type = converted %bool.make_type, %.loc21_25.1 [template = bool] // CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_34.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_34.2: type = converted %int.make_type_signed.loc21, %.loc21_34.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.param: bool = value_param runtime_param0 // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -110,18 +104,16 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc12: // 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_21.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_21.2: type = converted %int.make_type_signed.loc13, %.loc13_21.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %v: ref %i32 = bind_name v, %v.var // CHECK:STDOUT: %int_0.loc13: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13: = bound_method %int_0.loc13, %impl.elem0.loc13 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc13: = specific_function %Convert.bound.loc13, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %Convert.specific_fn.loc13(%int_0.loc13) [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc13_28: init %i32 = converted %int_0.loc13, %int.convert_checked.loc13 [template = constants.%int_0.2] -// CHECK:STDOUT: assign %v.var, %.loc13_28 +// CHECK:STDOUT: %.loc13: init %i32 = converted %int_0.loc13, %int.convert_checked.loc13 [template = constants.%int_0.2] +// CHECK:STDOUT: assign %v.var, %.loc13 // CHECK:STDOUT: br !if.else.loc12 // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc12: @@ -130,23 +122,21 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.then.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_21.1: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_21.2: type = converted %int.make_type_signed.loc16, %.loc16_21.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %w.var: ref %i32 = var w // CHECK:STDOUT: %w: ref %i32 = bind_name w, %w.var // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc16: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc16: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc16: = bound_method %int_1, %impl.elem0.loc16 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc16: = specific_function %Convert.bound.loc16, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %Convert.specific_fn.loc16(%int_1) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc16_28: init %i32 = converted %int_1, %int.convert_checked.loc16 [template = constants.%int_1.2] -// CHECK:STDOUT: assign %w.var, %.loc16_28 +// CHECK:STDOUT: %.loc16: init %i32 = converted %int_1, %int.convert_checked.loc16 [template = constants.%int_1.2] +// CHECK:STDOUT: assign %w.var, %.loc16 // CHECK:STDOUT: br !if.else.loc15 // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc15: // CHECK:STDOUT: %int_0.loc18: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc18: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc18: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc18: = bound_method %int_0.loc18, %impl.elem0.loc18 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc18: = specific_function %Convert.bound.loc18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %Convert.specific_fn.loc18(%int_0.loc18) [template = constants.%int_0.2] @@ -162,13 +152,11 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.then: // CHECK:STDOUT: %int_32.loc23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc23: init type = call constants.%Int(%int_32.loc23) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_21.1: type = value_of_initializer %int.make_type_signed.loc23 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_21.2: type = converted %int.make_type_signed.loc23, %.loc23_21.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %v: ref %i32 = bind_name v, %v.var // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc23: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc23: = bound_method %int_0, %impl.elem0.loc23 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc23: = specific_function %Convert.bound.loc23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc23: init %i32 = call %Convert.specific_fn.loc23(%int_0) [template = constants.%int_0.2] @@ -179,13 +167,11 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.else: // CHECK:STDOUT: %int_32.loc26: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc26: init type = call constants.%Int(%int_32.loc26) [template = constants.%i32] -// CHECK:STDOUT: %.loc26_19.1: type = value_of_initializer %int.make_type_signed.loc26 [template = constants.%i32] -// CHECK:STDOUT: %.loc26_19.2: type = converted %int.make_type_signed.loc26, %.loc26_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %w.var: ref %i32 = var w // CHECK:STDOUT: %w: ref %i32 = bind_name w, %w.var // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc26: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc26: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc26: = bound_method %int_1, %impl.elem0.loc26 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc26: = specific_function %Convert.bound.loc26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc26: init %i32 = call %Convert.specific_fn.loc26(%int_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/return/struct.carbon b/toolchain/check/testdata/return/struct.carbon index 43a1eb9d589f..758b0bdcb19b 100644 --- a/toolchain/check/testdata/return/struct.carbon +++ b/toolchain/check/testdata/return/struct.carbon @@ -16,19 +16,17 @@ fn Main() -> {.a: i32} { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %struct_type.a.1: type = struct_type {.a: %i32} [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %struct_type.a.2: type = struct_type {.a: 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %struct: %struct_type.a.1 = struct_value (%int_3.2) [template] @@ -37,7 +35,7 @@ fn Main() -> {.a: i32} { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -54,9 +52,7 @@ fn Main() -> {.a: i32} { // CHECK:STDOUT: %return.param_patt: %struct_type.a.1 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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_19.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_19.2: type = converted %int.make_type_signed, %.loc11_19.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [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 @@ -67,7 +63,7 @@ fn Main() -> {.a: i32} { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc12_17.1: %struct_type.a.2 = struct_literal (%int_3) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_3, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_3) [template = constants.%int_3.2] diff --git a/toolchain/check/testdata/return/tuple.carbon b/toolchain/check/testdata/return/tuple.carbon index 6c79d3698b34..bf416164d9e2 100644 --- a/toolchain/check/testdata/return/tuple.carbon +++ b/toolchain/check/testdata/return/tuple.carbon @@ -17,9 +17,7 @@ fn Main() -> (i32, i32) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [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: %Main.type: type = fn_type @Main [template] @@ -28,13 +26,13 @@ fn Main() -> (i32, i32) { // CHECK:STDOUT: %int_35.1: Core.IntLiteral = int_value 35 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_15.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_15.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_15.2: %i32 = int_value 15 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_35.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_35.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_35.2: %i32 = int_value 35 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_15.2, %int_35.2) [template] @@ -43,7 +41,7 @@ fn Main() -> (i32, i32) { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -60,15 +58,11 @@ fn Main() -> (i32, i32) { // CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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: %i32.loc12_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc12_20: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc12_20: init type = call constants.%Int(%int_32.loc12_20) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_23.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc12_15, %int.make_type_signed.loc12_20) -// CHECK:STDOUT: %.loc12_23.2: type = value_of_initializer %int.make_type_signed.loc12_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_23.3: type = converted %int.make_type_signed.loc12_15, %.loc12_23.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_23.4: type = value_of_initializer %int.make_type_signed.loc12_20 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_23.5: type = converted %int.make_type_signed.loc12_20, %.loc12_23.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_23.6: type = converted %.loc12_23.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc12_20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_23.1: %tuple.type.1 = tuple_literal (%i32.loc12_15, %i32.loc12_20) +// CHECK:STDOUT: %.loc12_23.2: type = converted %.loc12_23.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %return.param: ref %tuple.type.2 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %tuple.type.2 = return_slot %return.param // CHECK:STDOUT: } @@ -79,14 +73,14 @@ fn Main() -> (i32, i32) { // CHECK:STDOUT: %int_15: Core.IntLiteral = int_value 15 [template = constants.%int_15.1] // CHECK:STDOUT: %int_35: Core.IntLiteral = int_value 35 [template = constants.%int_35.1] // CHECK:STDOUT: %.loc13_17.1: %tuple.type.3 = tuple_literal (%int_15, %int_35) -// CHECK:STDOUT: %impl.elem0.loc13_17.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13_17.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13_17.1: = bound_method %int_15, %impl.elem0.loc13_17.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc13_17.1: = specific_function %Convert.bound.loc13_17.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc13_17.1: init %i32 = call %Convert.specific_fn.loc13_17.1(%int_15) [template = constants.%int_15.2] // CHECK:STDOUT: %.loc13_17.2: init %i32 = converted %int_15, %int.convert_checked.loc13_17.1 [template = constants.%int_15.2] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %return, element0 // CHECK:STDOUT: %.loc13_17.3: init %i32 = initialize_from %.loc13_17.2 to %tuple.elem0 [template = constants.%int_15.2] -// CHECK:STDOUT: %impl.elem0.loc13_17.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc13_17.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc13_17.2: = bound_method %int_35, %impl.elem0.loc13_17.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc13_17.2: = specific_function %Convert.bound.loc13_17.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc13_17.2: init %i32 = call %Convert.specific_fn.loc13_17.2(%int_35) [template = constants.%int_35.2] diff --git a/toolchain/check/testdata/return/value.carbon b/toolchain/check/testdata/return/value.carbon index 6c710b0cb44f..2855077b5b4d 100644 --- a/toolchain/check/testdata/return/value.carbon +++ b/toolchain/check/testdata/return/value.carbon @@ -16,17 +16,15 @@ fn Main() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -34,7 +32,7 @@ fn Main() -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -51,9 +49,7 @@ fn Main() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_14.2: type = converted %int.make_type_signed, %.loc11_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -62,7 +58,7 @@ fn Main() -> i32 { // CHECK:STDOUT: fn @Main() -> %i32 { // CHECK:STDOUT: !entry: // 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: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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] diff --git a/toolchain/check/testdata/struct/fail_assign_empty.carbon b/toolchain/check/testdata/struct/fail_assign_empty.carbon index 7891a8e5dcba..9182423b385f 100644 --- a/toolchain/check/testdata/struct/fail_assign_empty.carbon +++ b/toolchain/check/testdata/struct/fail_assign_empty.carbon @@ -17,16 +17,14 @@ var x: {.a: i32} = {}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -39,9 +37,7 @@ var x: {.a: i32} = {}; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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: %.loc14_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_signed, %.loc14_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a] // CHECK:STDOUT: %x.var: ref %struct_type.a = var x // CHECK:STDOUT: %x: ref %struct_type.a = bind_name x, %x.var diff --git a/toolchain/check/testdata/struct/fail_duplicate_name.carbon b/toolchain/check/testdata/struct/fail_duplicate_name.carbon index a7f9e922151d..82e44977a043 100644 --- a/toolchain/check/testdata/struct/fail_duplicate_name.carbon +++ b/toolchain/check/testdata/struct/fail_duplicate_name.carbon @@ -56,9 +56,7 @@ var y: {.b: i32, .c: i32} = {.b = 3, .b = 4}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] @@ -72,7 +70,7 @@ var y: {.b: i32, .c: i32} = {.b = 3, .b = 4}; // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -93,55 +91,33 @@ var y: {.b: i32, .c: i32} = {.b = 3, .b = 4}; // CHECK:STDOUT: %return.param_patt: = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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_16.1: type = value_of_initializer %int.make_type_signed.loc18_16 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_16.2: type = converted %int.make_type_signed.loc18_16, %.loc18_16.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc18_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc18_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc18_27: init type = call constants.%Int(%int_32.loc18_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_27.1: type = value_of_initializer %int.make_type_signed.loc18_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_27.2: type = converted %int.make_type_signed.loc18_27, %.loc18_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc18_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc18_36: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc18_36: init type = call constants.%Int(%int_32.loc18_36) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_36.1: type = value_of_initializer %int.make_type_signed.loc18_36 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_36.2: type = converted %int.make_type_signed.loc18_36, %.loc18_36.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc18_36: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc18_47: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc18_47: init type = call constants.%Int(%int_32.loc18_47) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_47.1: type = value_of_initializer %int.make_type_signed.loc18_47 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_47.2: type = converted %int.make_type_signed.loc18_47, %.loc18_47.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc18_47: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc18_56: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc18_56: init type = call constants.%Int(%int_32.loc18_56) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_56.1: type = value_of_initializer %int.make_type_signed.loc18_56 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_56.2: type = converted %int.make_type_signed.loc18_56, %.loc18_56.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc18_56: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref = out_param runtime_param0 // CHECK:STDOUT: %return: ref = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %int_32.loc27_13: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc27_13: init type = call constants.%Int(%int_32.loc27_13) [template = constants.%i32] -// CHECK:STDOUT: %.loc27_13.1: type = value_of_initializer %int.make_type_signed.loc27_13 [template = constants.%i32] -// CHECK:STDOUT: %.loc27_13.2: type = converted %int.make_type_signed.loc27_13, %.loc27_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc27_13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc27_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc27_22: init type = call constants.%Int(%int_32.loc27_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc27_22.1: type = value_of_initializer %int.make_type_signed.loc27_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc27_22.2: type = converted %int.make_type_signed.loc27_22, %.loc27_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc27_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc36: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc36: init type = call constants.%Int(%int_32.loc36) [template = constants.%i32] -// CHECK:STDOUT: %.loc36_8.1: type = value_of_initializer %int.make_type_signed.loc36 [template = constants.%i32] -// CHECK:STDOUT: %.loc36_8.2: type = converted %int.make_type_signed.loc36, %.loc36_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc36: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc45: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc45: init type = call constants.%Int(%int_32.loc45) [template = constants.%i32] -// CHECK:STDOUT: %.loc45_13.1: type = value_of_initializer %int.make_type_signed.loc45 [template = constants.%i32] -// CHECK:STDOUT: %.loc45_13.2: type = converted %int.make_type_signed.loc45, %.loc45_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc45: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a.2] // CHECK:STDOUT: %x.var: ref %struct_type.a.2 = var x // CHECK:STDOUT: %x: ref %struct_type.a.2 = bind_name x, %x.var // CHECK:STDOUT: %int_32.loc53_13: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc53_13: init type = call constants.%Int(%int_32.loc53_13) [template = constants.%i32] -// CHECK:STDOUT: %.loc53_13.1: type = value_of_initializer %int.make_type_signed.loc53_13 [template = constants.%i32] -// CHECK:STDOUT: %.loc53_13.2: type = converted %int.make_type_signed.loc53_13, %.loc53_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc53_13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc53_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc53_22: init type = call constants.%Int(%int_32.loc53_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc53_22.1: type = value_of_initializer %int.make_type_signed.loc53_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc53_22.2: type = converted %int.make_type_signed.loc53_22, %.loc53_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc53_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.b.c: type = struct_type {.b: %i32, .c: %i32} [template = constants.%struct_type.b.c] // CHECK:STDOUT: %y.var: ref %struct_type.b.c = var y // CHECK:STDOUT: %y: ref %struct_type.b.c = bind_name y, %y.var diff --git a/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon b/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon index b1514797c749..8a1e0bca575b 100644 --- a/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon +++ b/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon @@ -23,9 +23,7 @@ var y: {.b: i32} = x; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %struct_type.b.1: type = struct_type {.b: Core.IntLiteral} [template] @@ -34,7 +32,7 @@ var y: {.b: i32} = x; // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -48,16 +46,12 @@ var y: {.b: i32} = x; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a] // CHECK:STDOUT: %x.var: ref %struct_type.a = var x // CHECK:STDOUT: %x: ref %struct_type.a = bind_name x, %x.var // 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_13.1: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32] -// CHECK:STDOUT: %.loc20_13.2: type = converted %int.make_type_signed.loc20, %.loc20_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.b: type = struct_type {.b: %i32} [template = constants.%struct_type.b.2] // CHECK:STDOUT: %y.var: ref %struct_type.b.2 = var y // CHECK:STDOUT: %y: ref %struct_type.b.2 = bind_name y, %y.var diff --git a/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon b/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon index 5bf94c50209b..a36409840143 100644 --- a/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon +++ b/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon @@ -17,9 +17,7 @@ var x: {.a: i32} = {.b = 1.0}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template] // CHECK:STDOUT: %float: f64 = float_literal 1 [template] // CHECK:STDOUT: %struct_type.b: type = struct_type {.b: f64} [template] @@ -27,7 +25,7 @@ var x: {.a: i32} = {.b = 1.0}; // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -40,9 +38,7 @@ var x: {.a: i32} = {.b = 1.0}; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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: %.loc14_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_signed, %.loc14_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a] // CHECK:STDOUT: %x.var: ref %struct_type.a = var x // CHECK:STDOUT: %x: ref %struct_type.a = bind_name x, %x.var diff --git a/toolchain/check/testdata/struct/fail_member_access_type.carbon b/toolchain/check/testdata/struct/fail_member_access_type.carbon index 3f2dbeadae0b..2bce5ec8c957 100644 --- a/toolchain/check/testdata/struct/fail_member_access_type.carbon +++ b/toolchain/check/testdata/struct/fail_member_access_type.carbon @@ -24,9 +24,7 @@ var y: i32 = x.b; // CHECK:STDOUT: %float: f64 = float_literal 4 [template] // CHECK:STDOUT: %struct: %struct_type.a = struct_value (%float) [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -53,9 +51,7 @@ var y: i32 = x.b; // CHECK:STDOUT: %x.var: ref %struct_type.a = var x // CHECK:STDOUT: %x: ref %struct_type.a = bind_name x, %x.var // 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: %.loc15_8.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_signed, %.loc15_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %y.var: ref %i32 = var y // CHECK:STDOUT: %y: ref %i32 = bind_name y, %y.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/fail_non_member_access.carbon b/toolchain/check/testdata/struct/fail_non_member_access.carbon index a0e8586c850e..bf87dd513d7c 100644 --- a/toolchain/check/testdata/struct/fail_non_member_access.carbon +++ b/toolchain/check/testdata/struct/fail_non_member_access.carbon @@ -18,17 +18,15 @@ var y: i32 = x.b; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %struct_type.a.1: type = struct_type {.a: %i32} [template] // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] // CHECK:STDOUT: %struct_type.a.2: type = struct_type {.a: 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_4.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: %struct: %struct_type.a.1 = struct_value (%int_4.2) [template] @@ -37,7 +35,7 @@ var y: i32 = x.b; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -51,16 +49,12 @@ var y: i32 = x.b; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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_13.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13.2: type = converted %int.make_type_signed.loc11, %.loc11_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a.1] // CHECK:STDOUT: %x.var: ref %struct_type.a.1 = var x // CHECK:STDOUT: %x: ref %struct_type.a.1 = bind_name x, %x.var // 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: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %y.var: ref %i32 = var y // CHECK:STDOUT: %y: ref %i32 = bind_name y, %y.var // CHECK:STDOUT: } @@ -69,7 +63,7 @@ var y: i32 = x.b; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] // CHECK:STDOUT: %.loc11_27.1: %struct_type.a.2 = struct_literal (%int_4) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_4, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_4) [template = constants.%int_4.2] diff --git a/toolchain/check/testdata/struct/fail_too_few_values.carbon b/toolchain/check/testdata/struct/fail_too_few_values.carbon index e938cc36956d..41a1724505b8 100644 --- a/toolchain/check/testdata/struct/fail_too_few_values.carbon +++ b/toolchain/check/testdata/struct/fail_too_few_values.carbon @@ -17,9 +17,7 @@ var x: {.a: i32, .b: i32} = {.a = 1}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: Core.IntLiteral} [template] @@ -27,7 +25,7 @@ var x: {.a: i32, .b: i32} = {.a = 1}; // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -40,13 +38,9 @@ var x: {.a: i32, .b: i32} = {.a = 1}; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int_32.loc14_13: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_13: init type = call constants.%Int(%int_32.loc14_13) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %int.make_type_signed.loc14_13 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_signed.loc14_13, %.loc14_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc14_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_22: init type = call constants.%Int(%int_32.loc14_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_22.1: type = value_of_initializer %int.make_type_signed.loc14_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_22.2: type = converted %int.make_type_signed.loc14_22, %.loc14_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b] // CHECK:STDOUT: %x.var: ref %struct_type.a.b = var x // CHECK:STDOUT: %x: ref %struct_type.a.b = bind_name x, %x.var diff --git a/toolchain/check/testdata/struct/fail_type_assign.carbon b/toolchain/check/testdata/struct/fail_type_assign.carbon index 104603681e2d..fc8191ec155d 100644 --- a/toolchain/check/testdata/struct/fail_type_assign.carbon +++ b/toolchain/check/testdata/struct/fail_type_assign.carbon @@ -20,16 +20,14 @@ var x: {.a: i32} = {.a: i32}; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -42,9 +40,7 @@ var x: {.a: i32} = {.a: i32}; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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: %.loc17_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc17_13.2: type = converted %int.make_type_signed, %.loc17_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a] // CHECK:STDOUT: %x.var: ref %struct_type.a = var x // CHECK:STDOUT: %x: ref %struct_type.a = bind_name x, %x.var @@ -53,11 +49,9 @@ var x: {.a: i32} = {.a: i32}; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // 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: %.loc17_25.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc17_25.2: type = converted %int.make_type_signed, %.loc17_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a] -// CHECK:STDOUT: %.loc17_29: %struct_type.a = converted %struct_type.a, [template = ] +// CHECK:STDOUT: %.loc17: %struct_type.a = converted %struct_type.a, [template = ] // CHECK:STDOUT: assign file.%x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/import.carbon b/toolchain/check/testdata/struct/import.carbon index 8a3eb2418143..66bd8fddb690 100644 --- a/toolchain/check/testdata/struct/import.carbon +++ b/toolchain/check/testdata/struct/import.carbon @@ -43,10 +43,10 @@ var c_bad: C({.c = 1, .d = 2}) = F(); // --- fail_bad_value.impl.carbon impl package Implicit; -// CHECK:STDERR: fail_bad_value.impl.carbon:[[@LINE+6]]:1: error: cannot implicitly convert from `C()` to `C()` [ImplicitAsConversionFailure] +// CHECK:STDERR: fail_bad_value.impl.carbon:[[@LINE+6]]:1: error: cannot implicitly convert from `C()` to `C()` [ImplicitAsConversionFailure] // CHECK:STDERR: var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_bad_value.impl.carbon:[[@LINE+3]]:1: note: type `C()` does not implement interface `Core.ImplicitAs(C())` [MissingImplInMemberAccessNote] +// CHECK:STDERR: fail_bad_value.impl.carbon:[[@LINE+3]]:1: note: type `C()` does not implement interface `Core.ImplicitAs(C())` [MissingImplInMemberAccessNote] // CHECK:STDERR: var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var c_bad: C({.a = 3, .b = 4}) = F(); @@ -55,17 +55,15 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %struct_type.a.1: type = struct_type {.a: %i32} [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %struct_type.a.2: type = struct_type {.a: 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %struct.1: %struct_type.a.1 = struct_value (%int_0.2) [template] @@ -86,14 +84,14 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] // CHECK:STDOUT: %C.1: type = class_type @C, @C(%S) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %empty_struct_type [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.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %struct.4: %struct_type.a.b.1 = struct_value (%int_1.2, %int_2.2) [template] @@ -105,7 +103,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -121,27 +119,19 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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_17.1: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_17.2: type = converted %int.make_type_signed.loc4, %.loc4_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a.1] // CHECK:STDOUT: %a_ref.var: ref %struct_type.a.1 = var a_ref // CHECK:STDOUT: %a_ref: ref %struct_type.a.1 = bind_name a_ref, %a_ref.var // CHECK:STDOUT: %int_32.loc5_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_22: init type = call constants.%Int(%int_32.loc5_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_22.1: type = value_of_initializer %int.make_type_signed.loc5_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_22.2: type = converted %int.make_type_signed.loc5_22, %.loc5_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_32: init type = call constants.%Int(%int_32.loc5_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_36.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc5_32) -// CHECK:STDOUT: %.loc5_36.2: type = value_of_initializer %int.make_type_signed.loc5_32 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_36.3: type = converted %int.make_type_signed.loc5_32, %.loc5_36.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_36.4: type = converted %.loc5_36.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc5_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_36.1: %tuple.type.1 = tuple_literal (%i32.loc5_32) +// CHECK:STDOUT: %.loc5_36.2: type = converted %.loc5_36.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %struct_type.b.c: type = struct_type {.b: %i32, .c: %tuple.type.2} [template = constants.%struct_type.b.c.1] // CHECK:STDOUT: %int_32.loc5_44: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_44: init type = call constants.%Int(%int_32.loc5_44) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_44.1: type = value_of_initializer %int.make_type_signed.loc5_44 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_44.2: type = converted %int.make_type_signed.loc5_44, %.loc5_44.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_44: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a.d: type = struct_type {.a: %struct_type.b.c.1, .d: %i32} [template = constants.%struct_type.a.d.1] // CHECK:STDOUT: %b_ref.var: ref %struct_type.a.d.1 = var b_ref // CHECK:STDOUT: %b_ref: ref %struct_type.a.d.1 = bind_name b_ref, %b_ref.var @@ -150,13 +140,9 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %S.param_patt: %struct_type.a.b.1 = value_param_pattern %S.patt.loc8_9.1, runtime_param [symbolic = %S.patt.loc8_9.2 (constants.%S.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc8_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc8_18: init type = call constants.%Int(%int_32.loc8_18) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_18.1: type = value_of_initializer %int.make_type_signed.loc8_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_18.2: type = converted %int.make_type_signed.loc8_18, %.loc8_18.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc8_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc8_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc8_27: init type = call constants.%Int(%int_32.loc8_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_27.1: type = value_of_initializer %int.make_type_signed.loc8_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_27.2: type = converted %int.make_type_signed.loc8_27, %.loc8_27.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc8_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1] // CHECK:STDOUT: %S.param: %struct_type.a.b.1 = value_param runtime_param // CHECK:STDOUT: %S.loc8_9.1: %struct_type.a.b.1 = bind_symbolic_name S, 0, %S.param [symbolic = %S.loc8_9.2 (constants.%S)] @@ -169,13 +155,13 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc9_28.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc9_28.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_28.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_28.1: = bound_method %int_1, %impl.elem0.loc9_28.1 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc9_28.1: = specific_function %Convert.bound.loc9_28.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc9_28.1: init %i32 = call %Convert.specific_fn.loc9_28.1(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc9_28.2: %i32 = value_of_initializer %int.convert_checked.loc9_28.1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc9_28.3: %i32 = converted %int_1, %.loc9_28.2 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc9_28.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_28.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_28.2: = bound_method %int_2, %impl.elem0.loc9_28.2 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc9_28.2: = specific_function %Convert.bound.loc9_28.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc9_28.2: init %i32 = call %Convert.specific_fn.loc9_28.2(%int_2) [template = constants.%int_2.2] @@ -196,7 +182,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.1 @@ -210,7 +196,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0.loc4: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc4_31.1: %struct_type.a.2 = struct_literal (%int_0.loc4) -// CHECK:STDOUT: %impl.elem0.loc4: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4: = bound_method %int_0.loc4, %impl.elem0.loc4 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc4: = specific_function %Convert.bound.loc4, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc4: init %i32 = call %Convert.specific_fn.loc4(%int_0.loc4) [template = constants.%int_0.2] @@ -224,7 +210,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %.loc6_29.1: %struct_type.b.c.2 = struct_literal (%int_0.loc6_17, %.loc6_28.1) // CHECK:STDOUT: %int_0.loc6_37: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc6_38.1: %struct_type.a.d.3 = struct_literal (%.loc6_29.1, %int_0.loc6_37) -// CHECK:STDOUT: %impl.elem0.loc6_29: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc6_29: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc6_29: = bound_method %int_0.loc6_17, %impl.elem0.loc6_29 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc6_29: = specific_function %Convert.bound.loc6_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc6_29: init %i32 = call %Convert.specific_fn.loc6_29(%int_0.loc6_17) [template = constants.%int_0.2] @@ -232,7 +218,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %.loc6_38.2: ref %struct_type.b.c.1 = struct_access file.%b_ref.var, element0 // CHECK:STDOUT: %.loc6_29.3: ref %i32 = struct_access %.loc6_38.2, element0 // CHECK:STDOUT: %.loc6_29.4: init %i32 = initialize_from %.loc6_29.2 to %.loc6_29.3 [template = constants.%int_0.2] -// CHECK:STDOUT: %impl.elem0.loc6_28: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc6_28: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc6_28: = bound_method %int_0.loc6_26, %impl.elem0.loc6_28 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc6_28: = specific_function %Convert.bound.loc6_28, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc6_28: init %i32 = call %Convert.specific_fn.loc6_28(%int_0.loc6_26) [template = constants.%int_0.2] @@ -243,7 +229,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %.loc6_29.7: init %tuple.type.2 = initialize_from %.loc6_29.6 to %.loc6_29.5 [template = constants.%tuple] // CHECK:STDOUT: %.loc6_29.8: init %struct_type.b.c.1 = struct_init (%.loc6_29.4, %.loc6_29.7) to %.loc6_38.2 [template = constants.%struct.2] // CHECK:STDOUT: %.loc6_38.3: init %struct_type.b.c.1 = converted %.loc6_29.1, %.loc6_29.8 [template = constants.%struct.2] -// CHECK:STDOUT: %impl.elem0.loc6_38: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc6_38: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc6_38: = bound_method %int_0.loc6_37, %impl.elem0.loc6_38 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc6_38: = specific_function %Convert.bound.loc6_38, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc6_38: init %i32 = call %Convert.specific_fn.loc6_38(%int_0.loc6_37) [template = constants.%int_0.2] @@ -270,9 +256,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] @@ -281,21 +265,21 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template] // CHECK:STDOUT: %S: %struct_type.a.b.1 = bind_symbolic_name S, 0 [symbolic] // CHECK:STDOUT: %S.patt: %struct_type.a.b.1 = symbolic_binding_pattern S, 0 [symbolic] // 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.13: type = fn_type @Convert.1, @ImplicitAs(%i32) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = 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] @@ -310,13 +294,13 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, C, loaded [template = constants.%C.generic] // CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, F, loaded [template = constants.%F] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref.39 -// CHECK:STDOUT: .ImplicitAs = %import_ref.42 +// CHECK:STDOUT: .Int = %import_ref.194 +// CHECK:STDOUT: .ImplicitAs = %import_ref.197 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.40: = import_ref Implicit//default, loc8_34, loaded [template = constants.%complete_type.1] -// CHECK:STDOUT: %import_ref.41 = import_ref Implicit//default, inst436 [no loc], unloaded +// CHECK:STDOUT: %import_ref.195: = import_ref Implicit//default, loc8_34, loaded [template = constants.%complete_type.3] +// CHECK:STDOUT: %import_ref.196 = import_ref Implicit//default, inst602 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -334,27 +318,19 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core // 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: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a] // CHECK:STDOUT: %a.var: ref %struct_type.a = var a // CHECK:STDOUT: %a: ref %struct_type.a = bind_name a, %a.var // CHECK:STDOUT: %int_32.loc5_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_18: init type = call constants.%Int(%int_32.loc5_18) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18.1: type = value_of_initializer %int.make_type_signed.loc5_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18.2: type = converted %int.make_type_signed.loc5_18, %.loc5_18.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_28: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_28: init type = call constants.%Int(%int_32.loc5_28) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_32.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc5_28) -// CHECK:STDOUT: %.loc5_32.2: type = value_of_initializer %int.make_type_signed.loc5_28 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_32.3: type = converted %int.make_type_signed.loc5_28, %.loc5_32.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_32.4: type = converted %.loc5_32.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc5_28: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_32.1: %tuple.type.1 = tuple_literal (%i32.loc5_28) +// CHECK:STDOUT: %.loc5_32.2: type = converted %.loc5_32.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %struct_type.b.c: type = struct_type {.b: %i32, .c: %tuple.type.2} [template = constants.%struct_type.b.c] // CHECK:STDOUT: %int_32.loc5_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_40: init type = call constants.%Int(%int_32.loc5_40) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_40.1: type = value_of_initializer %int.make_type_signed.loc5_40 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_40.2: type = converted %int.make_type_signed.loc5_40, %.loc5_40.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a.d: type = struct_type {.a: %struct_type.b.c, .d: %i32} [template = constants.%struct_type.a.d.1] // CHECK:STDOUT: %b.var: ref %struct_type.a.d.1 = var b // CHECK:STDOUT: %b: ref %struct_type.a.d.1 = bind_name b, %b.var @@ -362,13 +338,13 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc6_25.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc6_25.1: %Convert.type.13 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc6_25.1: %Convert.type.9 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc6_25.1: = bound_method %int_1, %impl.elem0.loc6_25.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc6_25.1: = specific_function %Convert.bound.loc6_25.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc6_25.1: init %i32 = call %Convert.specific_fn.loc6_25.1(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc6_25.2: %i32 = value_of_initializer %int.convert_checked.loc6_25.1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc6_25.3: %i32 = converted %int_1, %.loc6_25.2 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc6_25.2: %Convert.type.13 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc6_25.2: %Convert.type.9 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc6_25.2: = bound_method %int_2, %impl.elem0.loc6_25.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc6_25.2: = specific_function %Convert.bound.loc6_25.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc6_25.2: init %i32 = call %Convert.specific_fn.loc6_25.2(%int_2) [template = constants.%int_2.2] @@ -389,8 +365,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.41 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.40 +// CHECK:STDOUT: .Self = imports.%import_ref.196 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.195 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -449,12 +425,12 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: --- fail_bad_type.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template] // CHECK:STDOUT: %S: %struct_type.a.b = bind_symbolic_name S, 0 [symbolic] // CHECK:STDOUT: %S.patt: %struct_type.a.b = symbolic_binding_pattern S, 0 [symbolic] @@ -478,8 +454,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.39: = import_ref Implicit//default, loc8_34, loaded [template = constants.%complete_type] -// CHECK:STDOUT: %import_ref.40 = import_ref Implicit//default, inst436 [no loc], unloaded +// CHECK:STDOUT: %import_ref.194: = import_ref Implicit//default, loc8_34, loaded [template = constants.%complete_type.3] +// CHECK:STDOUT: %import_ref.195 = import_ref Implicit//default, inst602 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -510,8 +486,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.40 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.39 +// CHECK:STDOUT: .Self = imports.%import_ref.195 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.194 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -541,26 +517,26 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: --- fail_bad_value.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template] // CHECK:STDOUT: %S: %struct_type.a.b.1 = bind_symbolic_name S, 0 [symbolic] // CHECK:STDOUT: %S.patt: %struct_type.a.b.1 = symbolic_binding_pattern S, 0 [symbolic] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] // CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] -// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.1, @ImplicitAs(%i32) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_4.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: %struct.1: %struct_type.a.b.1 = struct_value (%int_3.2, %int_4.2) [template] @@ -579,12 +555,12 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, C, loaded [template = constants.%C.generic] // CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, F, loaded [template = constants.%F] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .ImplicitAs = %import_ref.41 +// CHECK:STDOUT: .ImplicitAs = %import_ref.196 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.39: = import_ref Implicit//default, loc8_34, loaded [template = constants.%complete_type.1] -// CHECK:STDOUT: %import_ref.40 = import_ref Implicit//default, inst436 [no loc], unloaded +// CHECK:STDOUT: %import_ref.194: = import_ref Implicit//default, loc8_34, loaded [template = constants.%complete_type.3] +// CHECK:STDOUT: %import_ref.195 = import_ref Implicit//default, inst602 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -603,13 +579,13 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] // CHECK:STDOUT: %.loc9_29.1: %struct_type.a.b.2 = struct_literal (%int_3, %int_4) -// CHECK:STDOUT: %impl.elem0.loc9_29.1: %Convert.type.13 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_29.1: %Convert.type.9 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_29.1: = bound_method %int_3, %impl.elem0.loc9_29.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc9_29.1: = specific_function %Convert.bound.loc9_29.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc9_29.1: init %i32 = call %Convert.specific_fn.loc9_29.1(%int_3) [template = constants.%int_3.2] // CHECK:STDOUT: %.loc9_29.2: %i32 = value_of_initializer %int.convert_checked.loc9_29.1 [template = constants.%int_3.2] // CHECK:STDOUT: %.loc9_29.3: %i32 = converted %int_3, %.loc9_29.2 [template = constants.%int_3.2] -// CHECK:STDOUT: %impl.elem0.loc9_29.2: %Convert.type.13 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_29.2: %Convert.type.9 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_29.2: = bound_method %int_4, %impl.elem0.loc9_29.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc9_29.2: = specific_function %Convert.bound.loc9_29.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc9_29.2: init %i32 = call %Convert.specific_fn.loc9_29.2(%int_4) [template = constants.%int_4.2] @@ -630,8 +606,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.40 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.39 +// CHECK:STDOUT: .Self = imports.%import_ref.195 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.194 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/struct/literal_member_access.carbon b/toolchain/check/testdata/struct/literal_member_access.carbon index 8cc5390738fa..7c6d0131c236 100644 --- a/toolchain/check/testdata/struct/literal_member_access.carbon +++ b/toolchain/check/testdata/struct/literal_member_access.carbon @@ -18,9 +18,7 @@ fn F() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %struct_type.x.y.z: type = struct_type {.x: %i32, .y: %i32, .z: %i32} [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] @@ -33,7 +31,7 @@ fn F() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -51,17 +49,11 @@ fn F() -> i32 { // CHECK:STDOUT: %return.param_patt: %struct_type.x.y.z = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc11_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_16: init type = call constants.%Int(%int_32.loc11_16) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_16.1: type = value_of_initializer %int.make_type_signed.loc11_16 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_16.2: type = converted %int.make_type_signed.loc11_16, %.loc11_16.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_25: init type = call constants.%Int(%int_32.loc11_25) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.1: type = value_of_initializer %int.make_type_signed.loc11_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.2: type = converted %int.make_type_signed.loc11_25, %.loc11_25.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_34: init type = call constants.%Int(%int_32.loc11_34) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_34.1: type = value_of_initializer %int.make_type_signed.loc11_34 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_34.2: type = converted %int.make_type_signed.loc11_34, %.loc11_34.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.x.y.z: type = struct_type {.x: %i32, .y: %i32, .z: %i32} [template = constants.%struct_type.x.y.z] // CHECK:STDOUT: %return.param: ref %struct_type.x.y.z = out_param runtime_param0 // CHECK:STDOUT: %return: ref %struct_type.x.y.z = return_slot %return.param @@ -71,9 +63,7 @@ fn F() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_11.2: type = converted %int.make_type_signed, %.loc13_11.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/member_access.carbon b/toolchain/check/testdata/struct/member_access.carbon index 95d5fbd27a63..22065dfc41a5 100644 --- a/toolchain/check/testdata/struct/member_access.carbon +++ b/toolchain/check/testdata/struct/member_access.carbon @@ -19,18 +19,16 @@ var z: i32 = y; // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: f64, .b: %i32} [template] // CHECK:STDOUT: %float: f64 = float_literal 0 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: f64, .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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %struct: %struct_type.a.b.1 = struct_value (%float, %int_1.2) [template] @@ -40,7 +38,7 @@ var z: i32 = y; // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Float = %import_ref.1 // CHECK:STDOUT: .Int = %import_ref.2 -// CHECK:STDOUT: .ImplicitAs = %import_ref.3 +// CHECK:STDOUT: .ImplicitAs = %import_ref.6 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -59,22 +57,16 @@ var z: i32 = y; // CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc11_13.2: type = converted %float.make_type, %.loc11_13.1 [template = f64] // 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_22.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_22.2: type = converted %int.make_type_signed.loc11, %.loc11_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: f64, .b: %i32} [template = constants.%struct_type.a.b.1] // CHECK:STDOUT: %x.var: ref %struct_type.a.b.1 = var x // CHECK:STDOUT: %x: ref %struct_type.a.b.1 = bind_name x, %x.var // 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_8.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_signed.loc12, %.loc12_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %y.var: ref %i32 = var y // CHECK:STDOUT: %y: ref %i32 = bind_name y, %y.var // 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_8.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8.2: type = converted %int.make_type_signed.loc13, %.loc13_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %z.var: ref %i32 = var z // CHECK:STDOUT: %z: ref %i32 = bind_name z, %z.var // CHECK:STDOUT: } @@ -86,7 +78,7 @@ var z: i32 = y; // CHECK:STDOUT: %.loc11_46.1: %struct_type.a.b.2 = struct_literal (%float, %int_1) // CHECK:STDOUT: %.loc11_46.2: ref f64 = struct_access file.%x.var, element0 // CHECK:STDOUT: %.loc11_46.3: init f64 = initialize_from %float to %.loc11_46.2 [template = constants.%float] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/struct/nested_struct_in_place.carbon b/toolchain/check/testdata/struct/nested_struct_in_place.carbon index fe65e2d2cad9..87ae9e4f1f64 100644 --- a/toolchain/check/testdata/struct/nested_struct_in_place.carbon +++ b/toolchain/check/testdata/struct/nested_struct_in_place.carbon @@ -18,9 +18,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32, %i32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -32,7 +30,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -50,19 +48,13 @@ fn G() { // CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_12: init type = call constants.%Int(%int_32.loc11_12) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_17: init type = call constants.%Int(%int_32.loc11_17) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_22: init type = call constants.%Int(%int_32.loc11_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_12, %int.make_type_signed.loc11_17, %int.make_type_signed.loc11_22) -// CHECK:STDOUT: %.loc11_25.2: type = value_of_initializer %int.make_type_signed.loc11_12 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.3: type = converted %int.make_type_signed.loc11_12, %.loc11_25.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.4: type = value_of_initializer %int.make_type_signed.loc11_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.5: type = converted %int.make_type_signed.loc11_17, %.loc11_25.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.6: type = value_of_initializer %int.make_type_signed.loc11_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.7: type = converted %int.make_type_signed.loc11_22, %.loc11_25.6 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.8: type = converted %.loc11_25.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc11_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_25.1: %tuple.type.1 = tuple_literal (%i32.loc11_12, %i32.loc11_17, %i32.loc11_22) +// CHECK:STDOUT: %.loc11_25.2: type = converted %.loc11_25.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %return.param: ref %tuple.type.2 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %tuple.type.2 = return_slot %return.param // CHECK:STDOUT: } @@ -74,33 +66,21 @@ fn G() { // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_32.loc14_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_16: init type = call constants.%Int(%int_32.loc14_16) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc14_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_21: init type = call constants.%Int(%int_32.loc14_21) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc14_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_26: init type = call constants.%Int(%int_32.loc14_26) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_29.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc14_16, %int.make_type_signed.loc14_21, %int.make_type_signed.loc14_26) -// CHECK:STDOUT: %.loc14_29.2: type = value_of_initializer %int.make_type_signed.loc14_16 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_29.3: type = converted %int.make_type_signed.loc14_16, %.loc14_29.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_29.4: type = value_of_initializer %int.make_type_signed.loc14_21 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_29.5: type = converted %int.make_type_signed.loc14_21, %.loc14_29.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_29.6: type = value_of_initializer %int.make_type_signed.loc14_26 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_29.7: type = converted %int.make_type_signed.loc14_26, %.loc14_29.6 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_29.8: type = converted %.loc14_29.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc14_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_29.1: %tuple.type.1 = tuple_literal (%i32.loc14_16, %i32.loc14_21, %i32.loc14_26) +// CHECK:STDOUT: %.loc14_29.2: type = converted %.loc14_29.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %int_32.loc14_37: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_37: init type = call constants.%Int(%int_32.loc14_37) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_37: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc14_42: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_42: init type = call constants.%Int(%int_32.loc14_42) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_42: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc14_47: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_47: init type = call constants.%Int(%int_32.loc14_47) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_50.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc14_37, %int.make_type_signed.loc14_42, %int.make_type_signed.loc14_47) -// CHECK:STDOUT: %.loc14_50.2: type = value_of_initializer %int.make_type_signed.loc14_37 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_50.3: type = converted %int.make_type_signed.loc14_37, %.loc14_50.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_50.4: type = value_of_initializer %int.make_type_signed.loc14_42 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_50.5: type = converted %int.make_type_signed.loc14_42, %.loc14_50.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_50.6: type = value_of_initializer %int.make_type_signed.loc14_47 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_50.7: type = converted %int.make_type_signed.loc14_47, %.loc14_50.6 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_50.8: type = converted %.loc14_50.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc14_47: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_50.1: %tuple.type.1 = tuple_literal (%i32.loc14_37, %i32.loc14_42, %i32.loc14_47) +// CHECK:STDOUT: %.loc14_50.2: type = converted %.loc14_50.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %tuple.type.2, .b: %tuple.type.2} [template = constants.%struct_type.a.b.1] // CHECK:STDOUT: %v.var: ref %struct_type.a.b.1 = var v // CHECK:STDOUT: %v: ref %struct_type.a.b.1 = bind_name v, %v.var diff --git a/toolchain/check/testdata/struct/one_entry.carbon b/toolchain/check/testdata/struct/one_entry.carbon index e915f92d40e0..03503357507e 100644 --- a/toolchain/check/testdata/struct/one_entry.carbon +++ b/toolchain/check/testdata/struct/one_entry.carbon @@ -15,17 +15,15 @@ var y: {.a: i32} = x; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %struct_type.a.1: type = struct_type {.a: %i32} [template] // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] // CHECK:STDOUT: %struct_type.a.2: type = struct_type {.a: 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_4.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: %struct: %struct_type.a.1 = struct_value (%int_4.2) [template] @@ -34,7 +32,7 @@ var y: {.a: i32} = x; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -48,16 +46,12 @@ var y: {.a: i32} = x; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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_13.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13.2: type = converted %int.make_type_signed.loc11, %.loc11_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a.loc11: type = struct_type {.a: %i32} [template = constants.%struct_type.a.1] // CHECK:STDOUT: %x.var: ref %struct_type.a.1 = var x // CHECK:STDOUT: %x: ref %struct_type.a.1 = bind_name x, %x.var // 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_13.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_signed.loc12, %.loc12_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a.loc12: type = struct_type {.a: %i32} [template = constants.%struct_type.a.1] // CHECK:STDOUT: %y.var: ref %struct_type.a.1 = var y // CHECK:STDOUT: %y: ref %struct_type.a.1 = bind_name y, %y.var @@ -67,7 +61,7 @@ var y: {.a: i32} = x; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] // CHECK:STDOUT: %.loc11_27.1: %struct_type.a.2 = struct_literal (%int_4) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_4, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_4) [template = constants.%int_4.2] diff --git a/toolchain/check/testdata/struct/reorder_fields.carbon b/toolchain/check/testdata/struct/reorder_fields.carbon index d94ffc6f2e3a..cb790a47f455 100644 --- a/toolchain/check/testdata/struct/reorder_fields.carbon +++ b/toolchain/check/testdata/struct/reorder_fields.carbon @@ -21,9 +21,7 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %MakeI32.type: type = fn_type @MakeI32 [template] // CHECK:STDOUT: %MakeI32: %MakeI32.type = struct_value () [template] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] @@ -40,7 +38,7 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .Float = %import_ref.2 +// CHECK:STDOUT: .Float = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -59,9 +57,7 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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_17.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.2: type = converted %int.make_type_signed, %.loc11_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -81,9 +77,7 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: %return.param_patt: %struct_type.a.b = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%int_32.loc14) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_16.1: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_16.2: type = converted %int.make_type_signed.loc14, %.loc14_16.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_64.loc14: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc14: init type = call constants.%Float(%int_64.loc14) [template = f64] // CHECK:STDOUT: %.loc14_25.1: type = value_of_initializer %float.make_type.loc14 [template = f64] @@ -101,9 +95,7 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: fn @F() -> %return.param_patt: %struct_type.a.b { // CHECK:STDOUT: !entry: // 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_15.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_15.2: type = converted %int.make_type_signed.loc15, %.loc15_15.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_64.loc15: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc15: init type = call constants.%Float(%int_64.loc15) [template = f64] // CHECK:STDOUT: %.loc15_24.1: type = value_of_initializer %float.make_type.loc15 [template = f64] @@ -126,9 +118,7 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: %.loc16_15.1: type = value_of_initializer %float.make_type.loc16 [template = f64] // CHECK:STDOUT: %.loc16_15.2: type = converted %float.make_type.loc16, %.loc16_15.1 [template = f64] // 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_24.1: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_24.2: type = converted %int.make_type_signed.loc16, %.loc16_24.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.b.a: type = struct_type {.b: f64, .a: %i32} [template = constants.%struct_type.b.a] // CHECK:STDOUT: %x.ref: %struct_type.a.b = name_ref x, %x // CHECK:STDOUT: %.loc16_31.1: f64 = struct_access %x.ref, element1 diff --git a/toolchain/check/testdata/struct/tuple_as_element.carbon b/toolchain/check/testdata/struct/tuple_as_element.carbon index bf45c70b1d30..d70c4f22c747 100644 --- a/toolchain/check/testdata/struct/tuple_as_element.carbon +++ b/toolchain/check/testdata/struct/tuple_as_element.carbon @@ -15,9 +15,7 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] // CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %tuple.type.2} [template] @@ -26,13 +24,13 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] // CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: %tuple.type.3} [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_2.2) [template] @@ -42,7 +40,7 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -56,28 +54,20 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int_32.loc11_13: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_13: init type = call constants.%Int(%int_32.loc11_13) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %int.make_type_signed.loc11_13 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13.2: type = converted %int.make_type_signed.loc11_13, %.loc11_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_23: init type = call constants.%Int(%int_32.loc11_23) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_27.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_23) -// CHECK:STDOUT: %.loc11_27.2: type = value_of_initializer %int.make_type_signed.loc11_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_27.3: type = converted %int.make_type_signed.loc11_23, %.loc11_27.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_27.4: type = converted %.loc11_27.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc11_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_27.1: %tuple.type.1 = tuple_literal (%i32.loc11_23) +// CHECK:STDOUT: %.loc11_27.2: type = converted %.loc11_27.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %struct_type.a.b.loc11: type = struct_type {.a: %i32, .b: %tuple.type.2} [template = constants.%struct_type.a.b.1] // CHECK:STDOUT: %x.var: ref %struct_type.a.b.1 = var x // CHECK:STDOUT: %x: ref %struct_type.a.b.1 = bind_name x, %x.var // CHECK:STDOUT: %int_32.loc12_13: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc12_13: init type = call constants.%Int(%int_32.loc12_13) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_signed.loc12_13 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_signed.loc12_13, %.loc12_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12_13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc12_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc12_23: init type = call constants.%Int(%int_32.loc12_23) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_27.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc12_23) -// CHECK:STDOUT: %.loc12_27.2: type = value_of_initializer %int.make_type_signed.loc12_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_27.3: type = converted %int.make_type_signed.loc12_23, %.loc12_27.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_27.4: type = converted %.loc12_27.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc12_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_27.1: %tuple.type.1 = tuple_literal (%i32.loc12_23) +// CHECK:STDOUT: %.loc12_27.2: type = converted %.loc12_27.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %struct_type.a.b.loc12: type = struct_type {.a: %i32, .b: %tuple.type.2} [template = constants.%struct_type.a.b.1] // CHECK:STDOUT: %y.var: ref %struct_type.a.b.1 = var y // CHECK:STDOUT: %y: ref %struct_type.a.b.1 = bind_name y, %y.var @@ -89,14 +79,14 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc11_49.1: %tuple.type.3 = tuple_literal (%int_2) // CHECK:STDOUT: %.loc11_50.1: %struct_type.a.b.2 = struct_literal (%int_1, %.loc11_49.1) -// CHECK:STDOUT: %impl.elem0.loc11_50: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_50: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_50: = bound_method %int_1, %impl.elem0.loc11_50 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_50: = specific_function %Convert.bound.loc11_50, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_50: init %i32 = call %Convert.specific_fn.loc11_50(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc11_50.2: init %i32 = converted %int_1, %int.convert_checked.loc11_50 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc11_50.3: ref %i32 = struct_access file.%x.var, element0 // CHECK:STDOUT: %.loc11_50.4: init %i32 = initialize_from %.loc11_50.2 to %.loc11_50.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc11_49: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_49: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_49: = bound_method %int_2, %impl.elem0.loc11_49 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_49: = specific_function %Convert.bound.loc11_49, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_49: init %i32 = call %Convert.specific_fn.loc11_49(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/struct/two_entries.carbon b/toolchain/check/testdata/struct/two_entries.carbon index 6d571d62b38a..5fd7c423ccd5 100644 --- a/toolchain/check/testdata/struct/two_entries.carbon +++ b/toolchain/check/testdata/struct/two_entries.carbon @@ -18,21 +18,19 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = 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] @@ -41,7 +39,7 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -57,42 +55,26 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int_32.loc11_13: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_13: init type = call constants.%Int(%int_32.loc11_13) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %int.make_type_signed.loc11_13 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13.2: type = converted %int.make_type_signed.loc11_13, %.loc11_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_22: init type = call constants.%Int(%int_32.loc11_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_22.1: type = value_of_initializer %int.make_type_signed.loc11_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_22.2: type = converted %int.make_type_signed.loc11_22, %.loc11_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a.b.loc11: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1] // CHECK:STDOUT: %int_32.loc12_13: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc12_13: init type = call constants.%Int(%int_32.loc12_13) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.1: type = value_of_initializer %int.make_type_signed.loc12_13 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.2: type = converted %int.make_type_signed.loc12_13, %.loc12_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12_13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc12_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc12_22: init type = call constants.%Int(%int_32.loc12_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_22.1: type = value_of_initializer %int.make_type_signed.loc12_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_22.2: type = converted %int.make_type_signed.loc12_22, %.loc12_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12_22: type = class_type @Int, @Int(constants.%int_32) [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: %int_32.loc14_13: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_13: init type = call constants.%Int(%int_32.loc14_13) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %int.make_type_signed.loc14_13 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_13.2: type = converted %int.make_type_signed.loc14_13, %.loc14_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc14_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_22: init type = call constants.%Int(%int_32.loc14_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_22.1: type = value_of_initializer %int.make_type_signed.loc14_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_22.2: type = converted %int.make_type_signed.loc14_22, %.loc14_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_22: type = class_type @Int, @Int(constants.%int_32) [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: %x.var: ref %struct_type.a.b.1 = var x // CHECK:STDOUT: %x: ref %struct_type.a.b.1 = bind_name x, %x.var // CHECK:STDOUT: %int_32.loc15_13: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc15_13: init type = call constants.%Int(%int_32.loc15_13) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_13.1: type = value_of_initializer %int.make_type_signed.loc15_13 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_13.2: type = converted %int.make_type_signed.loc15_13, %.loc15_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc15_13: type = class_type @Int, @Int(constants.%int_32) [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_22.1: type = value_of_initializer %int.make_type_signed.loc15_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_22.2: type = converted %int.make_type_signed.loc15_22, %.loc15_22.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc15_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a.b.loc15: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1] // CHECK:STDOUT: %y.var: ref %struct_type.a.b.1 = var y // CHECK:STDOUT: %y: ref %struct_type.a.b.1 = bind_name y, %y.var @@ -103,13 +85,13 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc11: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc11_44.1: %struct_type.a.b.2 = struct_literal (%int_1.loc11, %int_2.loc11) -// CHECK:STDOUT: %impl.elem0.loc11_44.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_44.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_44.1: = bound_method %int_1.loc11, %impl.elem0.loc11_44.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_44.1: = specific_function %Convert.bound.loc11_44.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_44.1: init %i32 = call %Convert.specific_fn.loc11_44.1(%int_1.loc11) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc11_44.2: %i32 = value_of_initializer %int.convert_checked.loc11_44.1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc11_44.3: %i32 = converted %int_1.loc11, %.loc11_44.2 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc11_44.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_44.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_44.2: = bound_method %int_2.loc11, %impl.elem0.loc11_44.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_44.2: = specific_function %Convert.bound.loc11_44.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_44.2: init %i32 = call %Convert.specific_fn.loc11_44.2(%int_2.loc11) [template = constants.%int_2.2] @@ -123,14 +105,14 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: %int_1.loc14: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc14: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc14_44.1: %struct_type.a.b.2 = struct_literal (%int_1.loc14, %int_2.loc14) -// CHECK:STDOUT: %impl.elem0.loc14_44.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14_44.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_44.1: = bound_method %int_1.loc14, %impl.elem0.loc14_44.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc14_44.1: = specific_function %Convert.bound.loc14_44.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc14_44.1: init %i32 = call %Convert.specific_fn.loc14_44.1(%int_1.loc14) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc14_44.2: init %i32 = converted %int_1.loc14, %int.convert_checked.loc14_44.1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc14_44.3: ref %i32 = struct_access file.%x.var, element0 // CHECK:STDOUT: %.loc14_44.4: init %i32 = initialize_from %.loc14_44.2 to %.loc14_44.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc14_44.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14_44.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_44.2: = bound_method %int_2.loc14, %impl.elem0.loc14_44.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc14_44.2: = specific_function %Convert.bound.loc14_44.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc14_44.2: init %i32 = call %Convert.specific_fn.loc14_44.2(%int_2.loc14) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/tuple/access/element_access.carbon b/toolchain/check/testdata/tuple/access/element_access.carbon index 44dc9a6c6286..98cac2e6fdf2 100644 --- a/toolchain/check/testdata/tuple/access/element_access.carbon +++ b/toolchain/check/testdata/tuple/access/element_access.carbon @@ -16,18 +16,16 @@ var c: i32 = b.0; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] // CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_12.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_12.2) [template] @@ -37,7 +35,7 @@ var c: i32 = b.0; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -52,25 +50,19 @@ var c: i32 = b.0; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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_13.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11) -// CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13.3: type = converted %int.make_type_signed.loc11, %.loc11_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13.4: type = converted %.loc11_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_13.1: %tuple.type.1 = tuple_literal (%i32.loc11) +// CHECK:STDOUT: %.loc11_13.2: type = converted %.loc11_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var // 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_13.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc12) -// CHECK:STDOUT: %.loc12_13.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.3: type = converted %int.make_type_signed.loc12, %.loc12_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.4: type = converted %.loc12_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_13.1: %tuple.type.1 = tuple_literal (%i32.loc12) +// CHECK:STDOUT: %.loc12_13.2: type = converted %.loc12_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %b.var: ref %tuple.type.2 = var b // CHECK:STDOUT: %b: ref %tuple.type.2 = bind_name b, %b.var // 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_8.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_8.2: type = converted %int.make_type_signed.loc13, %.loc13_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %c.var: ref %i32 = var c // CHECK:STDOUT: %c: ref %i32 = bind_name c, %c.var // CHECK:STDOUT: } @@ -79,7 +71,7 @@ var c: i32 = b.0; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] // CHECK:STDOUT: %.loc11_21.1: %tuple.type.3 = tuple_literal (%int_12) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_12, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_12) [template = constants.%int_12.2] diff --git a/toolchain/check/testdata/tuple/access/fail_access_error.carbon b/toolchain/check/testdata/tuple/access/fail_access_error.carbon index 7bc714937c5b..c8a6cbf34d4e 100644 --- a/toolchain/check/testdata/tuple/access/fail_access_error.carbon +++ b/toolchain/check/testdata/tuple/access/fail_access_error.carbon @@ -18,22 +18,20 @@ var b: i32 = a.(oops); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [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: %int_12.1: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: %int_6.1: Core.IntLiteral = int_value 6 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_6.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_6.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_6.2: %i32 = int_value 6 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_12.2, %int_6.2) [template] @@ -42,7 +40,7 @@ var b: i32 = a.(oops); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -56,21 +54,15 @@ var b: i32 = a.(oops); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%int_32.loc11_9) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%int_32.loc11_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_9, %int.make_type_signed.loc11_14) -// CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_signed.loc11_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_signed.loc11_9, %.loc11_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.4: type = value_of_initializer %int.make_type_signed.loc11_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.5: type = converted %int.make_type_signed.loc11_14, %.loc11_17.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc11_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%i32.loc11_9, %i32.loc11_14) +// CHECK:STDOUT: %.loc11_17.2: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var // 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: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } @@ -80,14 +72,14 @@ var b: i32 = a.(oops); // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.1] // CHECK:STDOUT: %.loc11_27.1: %tuple.type.3 = tuple_literal (%int_12, %int_6) -// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_27.1: = bound_method %int_12, %impl.elem0.loc11_27.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_27.1: = specific_function %Convert.bound.loc11_27.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %Convert.specific_fn.loc11_27.1(%int_12) [template = constants.%int_12.2] // CHECK:STDOUT: %.loc11_27.2: init %i32 = converted %int_12, %int.convert_checked.loc11_27.1 [template = constants.%int_12.2] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%a.var, element0 // CHECK:STDOUT: %.loc11_27.3: init %i32 = initialize_from %.loc11_27.2 to %tuple.elem0 [template = constants.%int_12.2] -// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_27.2: = bound_method %int_6, %impl.elem0.loc11_27.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_27.2: = specific_function %Convert.bound.loc11_27.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %Convert.specific_fn.loc11_27.2(%int_6) [template = constants.%int_6.2] diff --git a/toolchain/check/testdata/tuple/access/fail_large_index.carbon b/toolchain/check/testdata/tuple/access/fail_large_index.carbon index 85afe12ff72d..8f2ca20ac609 100644 --- a/toolchain/check/testdata/tuple/access/fail_large_index.carbon +++ b/toolchain/check/testdata/tuple/access/fail_large_index.carbon @@ -24,18 +24,16 @@ var d: i32 = b.(0x7FFF_FFFF); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] // CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_12.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_12.2) [template] @@ -46,7 +44,7 @@ var d: i32 = b.(0x7FFF_FFFF); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -62,31 +60,23 @@ var d: i32 = b.(0x7FFF_FFFF); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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_13.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11) -// CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13.3: type = converted %int.make_type_signed.loc11, %.loc11_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13.4: type = converted %.loc11_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_13.1: %tuple.type.1 = tuple_literal (%i32.loc11) +// CHECK:STDOUT: %.loc11_13.2: type = converted %.loc11_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var // 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_13.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc12) -// CHECK:STDOUT: %.loc12_13.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.3: type = converted %int.make_type_signed.loc12, %.loc12_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.4: type = converted %.loc12_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_13.1: %tuple.type.1 = tuple_literal (%i32.loc12) +// CHECK:STDOUT: %.loc12_13.2: type = converted %.loc12_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %b.var: ref %tuple.type.2 = var b // CHECK:STDOUT: %b: ref %tuple.type.2 = bind_name b, %b.var // CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%int_32.loc17) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_8.1: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_8.2: type = converted %int.make_type_signed.loc17, %.loc17_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %c.var: ref %i32 = var c // CHECK:STDOUT: %c: ref %i32 = bind_name c, %c.var // CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] -// CHECK:STDOUT: %.loc21_8.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_8.2: type = converted %int.make_type_signed.loc21, %.loc21_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %d.var: ref %i32 = var d // CHECK:STDOUT: %d: ref %i32 = bind_name d, %d.var // CHECK:STDOUT: } @@ -95,7 +85,7 @@ var d: i32 = b.(0x7FFF_FFFF); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] // CHECK:STDOUT: %.loc11_21.1: %tuple.type.3 = tuple_literal (%int_12) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_12, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_12) [template = constants.%int_12.2] diff --git a/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon b/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon index 634fc9e1f20f..2d6290bd0850 100644 --- a/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon +++ b/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon @@ -18,22 +18,20 @@ var b: i32 = a.(-10); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [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: %int_12.1: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: %int_6.1: Core.IntLiteral = int_value 6 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_6.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_6.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_6.2: %i32 = int_value 6 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_12.2, %int_6.2) [template] @@ -43,8 +41,8 @@ var b: i32 = a.(-10); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 -// CHECK:STDOUT: .Negate = %import_ref.38 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 +// CHECK:STDOUT: .Negate = %import_ref.193 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -58,21 +56,15 @@ var b: i32 = a.(-10); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%int_32.loc11_9) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%int_32.loc11_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_9, %int.make_type_signed.loc11_14) -// CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_signed.loc11_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_signed.loc11_9, %.loc11_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.4: type = value_of_initializer %int.make_type_signed.loc11_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.5: type = converted %int.make_type_signed.loc11_14, %.loc11_17.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc11_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%i32.loc11_9, %i32.loc11_14) +// CHECK:STDOUT: %.loc11_17.2: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var // 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: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } @@ -82,14 +74,14 @@ var b: i32 = a.(-10); // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.1] // CHECK:STDOUT: %.loc11_27.1: %tuple.type.3 = tuple_literal (%int_12, %int_6) -// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_27.1: = bound_method %int_12, %impl.elem0.loc11_27.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_27.1: = specific_function %Convert.bound.loc11_27.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %Convert.specific_fn.loc11_27.1(%int_12) [template = constants.%int_12.2] // CHECK:STDOUT: %.loc11_27.2: init %i32 = converted %int_12, %int.convert_checked.loc11_27.1 [template = constants.%int_12.2] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%a.var, element0 // CHECK:STDOUT: %.loc11_27.3: init %i32 = initialize_from %.loc11_27.2 to %tuple.elem0 [template = constants.%int_12.2] -// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_27.2: = bound_method %int_6, %impl.elem0.loc11_27.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_27.2: = specific_function %Convert.bound.loc11_27.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %Convert.specific_fn.loc11_27.2(%int_6) [template = constants.%int_6.2] diff --git a/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon b/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon index f5e0598528e9..c58c71b7d95e 100644 --- a/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon +++ b/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon @@ -19,27 +19,25 @@ var c: i32 = a.(b); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [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: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_2.2, %int_3.2) [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -47,7 +45,7 @@ var c: i32 = a.(b); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -62,27 +60,19 @@ var c: i32 = a.(b); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%int_32.loc11_9) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%int_32.loc11_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_9, %int.make_type_signed.loc11_14) -// CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_signed.loc11_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_signed.loc11_9, %.loc11_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.4: type = value_of_initializer %int.make_type_signed.loc11_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.5: type = converted %int.make_type_signed.loc11_14, %.loc11_17.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc11_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%i32.loc11_9, %i32.loc11_14) +// CHECK:STDOUT: %.loc11_17.2: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var // 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_8.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_signed.loc12, %.loc12_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // 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_8.1: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_8.2: type = converted %int.make_type_signed.loc16, %.loc16_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %c.var: ref %i32 = var c // CHECK:STDOUT: %c: ref %i32 = bind_name c, %c.var // CHECK:STDOUT: } @@ -92,14 +82,14 @@ var c: i32 = a.(b); // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc11_26.1: %tuple.type.3 = tuple_literal (%int_2, %int_3) -// CHECK:STDOUT: %impl.elem0.loc11_26.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_26.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_26.1: = bound_method %int_2, %impl.elem0.loc11_26.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_26.1: = specific_function %Convert.bound.loc11_26.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_26.1: init %i32 = call %Convert.specific_fn.loc11_26.1(%int_2) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc11_26.2: init %i32 = converted %int_2, %int.convert_checked.loc11_26.1 [template = constants.%int_2.2] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%a.var, element0 // CHECK:STDOUT: %.loc11_26.3: init %i32 = initialize_from %.loc11_26.2 to %tuple.elem0 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_26.2: = bound_method %int_3, %impl.elem0.loc11_26.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_26.2: = specific_function %Convert.bound.loc11_26.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_26.2: init %i32 = call %Convert.specific_fn.loc11_26.2(%int_3) [template = constants.%int_3.2] @@ -110,7 +100,7 @@ var c: i32 = a.(b); // CHECK:STDOUT: %.loc11_27: init %tuple.type.2 = converted %.loc11_26.1, %.loc11_26.6 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_27 // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12: = bound_method %int_0, %impl.elem0.loc12 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc12: = specific_function %Convert.bound.loc12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %Convert.specific_fn.loc12(%int_0) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon b/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon index 2b41b07cc056..d93c84e75b25 100644 --- a/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon +++ b/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon @@ -21,22 +21,20 @@ var b: i32 = a.(2.6); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [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: %int_12.1: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: %int_6.1: Core.IntLiteral = int_value 6 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_6.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_6.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_6.2: %i32 = int_value 6 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_12.2, %int_6.2) [template] @@ -46,7 +44,7 @@ var b: i32 = a.(2.6); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -60,21 +58,15 @@ var b: i32 = a.(2.6); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%int_32.loc11_9) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%int_32.loc11_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_9, %int.make_type_signed.loc11_14) -// CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_signed.loc11_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_signed.loc11_9, %.loc11_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.4: type = value_of_initializer %int.make_type_signed.loc11_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.5: type = converted %int.make_type_signed.loc11_14, %.loc11_17.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc11_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%i32.loc11_9, %i32.loc11_14) +// CHECK:STDOUT: %.loc11_17.2: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var // 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_8.1: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_8.2: type = converted %int.make_type_signed.loc18, %.loc18_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } @@ -84,14 +76,14 @@ var b: i32 = a.(2.6); // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.1] // CHECK:STDOUT: %.loc11_27.1: %tuple.type.3 = tuple_literal (%int_12, %int_6) -// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_27.1: = bound_method %int_12, %impl.elem0.loc11_27.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_27.1: = specific_function %Convert.bound.loc11_27.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %Convert.specific_fn.loc11_27.1(%int_12) [template = constants.%int_12.2] // CHECK:STDOUT: %.loc11_27.2: init %i32 = converted %int_12, %int.convert_checked.loc11_27.1 [template = constants.%int_12.2] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%a.var, element0 // CHECK:STDOUT: %.loc11_27.3: init %i32 = initialize_from %.loc11_27.2 to %tuple.elem0 [template = constants.%int_12.2] -// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_27.2: = bound_method %int_6, %impl.elem0.loc11_27.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_27.2: = specific_function %Convert.bound.loc11_27.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %Convert.specific_fn.loc11_27.2(%int_6) [template = constants.%int_6.2] diff --git a/toolchain/check/testdata/tuple/access/fail_non_tuple_access.carbon b/toolchain/check/testdata/tuple/access/fail_non_tuple_access.carbon index 7be990376482..9ea058c14ccd 100644 --- a/toolchain/check/testdata/tuple/access/fail_non_tuple_access.carbon +++ b/toolchain/check/testdata/tuple/access/fail_non_tuple_access.carbon @@ -30,18 +30,16 @@ fn Main() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %array_type: type = array_type %int_2, %i32 [template] // CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_5.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_5.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_5.2, %int_5.2) [template] @@ -51,7 +49,7 @@ fn Main() { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .IndexWith = %import_ref.1 // CHECK:STDOUT: .Int = %import_ref.6 -// CHECK:STDOUT: .ImplicitAs = %import_ref.7 +// CHECK:STDOUT: .ImplicitAs = %import_ref.10 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -71,17 +69,15 @@ fn Main() { // CHECK:STDOUT: %int_0.loc16: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %int_1.loc16: Core.IntLiteral = int_value 1 [template = constants.%int_1] // 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: %i32.loc18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] -// CHECK:STDOUT: %.loc18_19.1: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_19.2: type = converted %int.make_type_signed.loc18, %.loc18_19.1 [template = constants.%i32] // CHECK:STDOUT: %array_type: type = array_type %int_2, %i32 [template = constants.%array_type] // CHECK:STDOUT: %non_tuple.var: ref %array_type = var non_tuple // CHECK:STDOUT: %non_tuple: ref %array_type = bind_name non_tuple, %non_tuple.var // CHECK:STDOUT: %int_5.loc18_30: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] // CHECK:STDOUT: %int_5.loc18_33: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] // CHECK:STDOUT: %.loc18_34.1: %tuple.type = tuple_literal (%int_5.loc18_30, %int_5.loc18_33) -// CHECK:STDOUT: %impl.elem0.loc18_34.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc18_34.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc18_34.1: = bound_method %int_5.loc18_30, %impl.elem0.loc18_34.1 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc18_34.1: = specific_function %Convert.bound.loc18_34.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc18_34.1: init %i32 = call %Convert.specific_fn.loc18_34.1(%int_5.loc18_30) [template = constants.%int_5.2] @@ -89,7 +85,7 @@ fn Main() { // CHECK:STDOUT: %int_0.loc18: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %.loc18_34.3: ref %i32 = array_index %non_tuple.var, %int_0.loc18 // CHECK:STDOUT: %.loc18_34.4: init %i32 = initialize_from %.loc18_34.2 to %.loc18_34.3 [template = constants.%int_5.2] -// CHECK:STDOUT: %impl.elem0.loc18_34.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc18_34.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc18_34.2: = bound_method %int_5.loc18_33, %impl.elem0.loc18_34.2 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc18_34.2: = specific_function %Convert.bound.loc18_34.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc18_34.2: init %i32 = call %Convert.specific_fn.loc18_34.2(%int_5.loc18_33) [template = constants.%int_5.2] @@ -101,9 +97,7 @@ fn Main() { // CHECK:STDOUT: %.loc18_35: init %array_type = converted %.loc18_34.1, %.loc18_34.8 [template = constants.%array] // CHECK:STDOUT: assign %non_tuple.var, %.loc18_35 // 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_14.1: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] -// CHECK:STDOUT: %.loc22_14.2: type = converted %int.make_type_signed.loc22, %.loc22_14.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %first.var: ref %i32 = var first // CHECK:STDOUT: %first: ref %i32 = bind_name first, %first.var // CHECK:STDOUT: %non_tuple.ref: ref %array_type = name_ref non_tuple, %non_tuple diff --git a/toolchain/check/testdata/tuple/access/fail_out_of_bound_access.carbon b/toolchain/check/testdata/tuple/access/fail_out_of_bound_access.carbon index f17a1a217518..4e42dbddd939 100644 --- a/toolchain/check/testdata/tuple/access/fail_out_of_bound_access.carbon +++ b/toolchain/check/testdata/tuple/access/fail_out_of_bound_access.carbon @@ -18,22 +18,20 @@ var b: i32 = a.2; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [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: %int_12.1: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: %int_6.1: Core.IntLiteral = int_value 6 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_6.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_6.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_6.2: %i32 = int_value 6 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_12.2, %int_6.2) [template] @@ -43,7 +41,7 @@ var b: i32 = a.2; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -57,21 +55,15 @@ var b: i32 = a.2; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%int_32.loc11_9) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%int_32.loc11_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_9, %int.make_type_signed.loc11_14) -// CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_signed.loc11_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_signed.loc11_9, %.loc11_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.4: type = value_of_initializer %int.make_type_signed.loc11_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.5: type = converted %int.make_type_signed.loc11_14, %.loc11_17.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc11_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%i32.loc11_9, %i32.loc11_14) +// CHECK:STDOUT: %.loc11_17.2: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var // 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: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } @@ -81,14 +73,14 @@ var b: i32 = a.2; // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.1] // CHECK:STDOUT: %.loc11_27.1: %tuple.type.3 = tuple_literal (%int_12, %int_6) -// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_27.1: = bound_method %int_12, %impl.elem0.loc11_27.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_27.1: = specific_function %Convert.bound.loc11_27.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %Convert.specific_fn.loc11_27.1(%int_12) [template = constants.%int_12.2] // CHECK:STDOUT: %.loc11_27.2: init %i32 = converted %int_12, %int.convert_checked.loc11_27.1 [template = constants.%int_12.2] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%a.var, element0 // CHECK:STDOUT: %.loc11_27.3: init %i32 = initialize_from %.loc11_27.2 to %tuple.elem0 [template = constants.%int_12.2] -// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_27.2: = bound_method %int_6, %impl.elem0.loc11_27.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_27.2: = specific_function %Convert.bound.loc11_27.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %Convert.specific_fn.loc11_27.2(%int_6) [template = constants.%int_6.2] diff --git a/toolchain/check/testdata/tuple/access/fail_out_of_bound_not_literal.carbon b/toolchain/check/testdata/tuple/access/fail_out_of_bound_not_literal.carbon index 556bb27f69a8..6e1d4d68c4d1 100644 --- a/toolchain/check/testdata/tuple/access/fail_out_of_bound_not_literal.carbon +++ b/toolchain/check/testdata/tuple/access/fail_out_of_bound_not_literal.carbon @@ -18,22 +18,20 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [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: %int_12.1: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: %int_34.1: Core.IntLiteral = int_value 34 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_34.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_34.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_34.2: %i32 = int_value 34 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_12.2, %int_34.2) [template] @@ -45,7 +43,7 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -59,21 +57,15 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%int_32.loc11_9) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%int_32.loc11_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_9, %int.make_type_signed.loc11_14) -// CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_signed.loc11_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_signed.loc11_9, %.loc11_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.4: type = value_of_initializer %int.make_type_signed.loc11_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.5: type = converted %int.make_type_signed.loc11_14, %.loc11_17.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc11_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%i32.loc11_9, %i32.loc11_14) +// CHECK:STDOUT: %.loc11_17.2: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var // 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: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } @@ -83,14 +75,14 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] // CHECK:STDOUT: %int_34: Core.IntLiteral = int_value 34 [template = constants.%int_34.1] // CHECK:STDOUT: %.loc11_28.1: %tuple.type.3 = tuple_literal (%int_12, %int_34) -// CHECK:STDOUT: %impl.elem0.loc11_28.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_28.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_28.1: = bound_method %int_12, %impl.elem0.loc11_28.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_28.1: = specific_function %Convert.bound.loc11_28.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_28.1: init %i32 = call %Convert.specific_fn.loc11_28.1(%int_12) [template = constants.%int_12.2] // CHECK:STDOUT: %.loc11_28.2: init %i32 = converted %int_12, %int.convert_checked.loc11_28.1 [template = constants.%int_12.2] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%a.var, element0 // CHECK:STDOUT: %.loc11_28.3: init %i32 = initialize_from %.loc11_28.2 to %tuple.elem0 [template = constants.%int_12.2] -// CHECK:STDOUT: %impl.elem0.loc11_28.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_28.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_28.2: = bound_method %int_34, %impl.elem0.loc11_28.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_28.2: = specific_function %Convert.bound.loc11_28.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_28.2: init %i32 = call %Convert.specific_fn.loc11_28.2(%int_34) [template = constants.%int_34.2] diff --git a/toolchain/check/testdata/tuple/access/index_not_literal.carbon b/toolchain/check/testdata/tuple/access/index_not_literal.carbon index b3ae52b3e521..6e45793f2a6c 100644 --- a/toolchain/check/testdata/tuple/access/index_not_literal.carbon +++ b/toolchain/check/testdata/tuple/access/index_not_literal.carbon @@ -19,20 +19,18 @@ var d: i32 = a.({.index = 1 as i32}.index); // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (bool, %i32) [template] // CHECK:STDOUT: %true: bool = bool_literal true [template] // CHECK:STDOUT: %int_34.1: Core.IntLiteral = int_value 34 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (bool, Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_34.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_34.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_34.2: %i32 = int_value 34 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%true, %int_34.2) [template] @@ -40,33 +38,33 @@ var d: i32 = a.({.index = 1 as i32}.index); // CHECK:STDOUT: %struct_type.index.1: type = struct_type {.index: Core.IntLiteral} [template] // CHECK:STDOUT: %struct.1: %struct_type.index.1 = struct_value (%int_1.1) [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.6, @As(%i32) [template] -// CHECK:STDOUT: %Convert.type.16: type = fn_type @Convert.7, @impl.5(%int_32) [template] -// CHECK:STDOUT: %Convert.16: %Convert.type.16 = struct_value () [template] -// CHECK:STDOUT: %interface.10: = interface_witness (%Convert.16) [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.16 [template] -// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.7(%int_32) [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.4, @As(%i32) [template] +// CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.5, @impl.3(%int_32) [template] +// CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [template] +// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.12) [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.12 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.5(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] -// CHECK:STDOUT: %Convert.type.17: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.17: %Convert.type.17 = struct_value () [template] -// CHECK:STDOUT: %interface.11: = interface_witness (%Convert.17) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.2, %Convert.17 [template] -// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_1.1, %Convert.16 [template] -// CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.7(%int_32) [template] +// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] +// CHECK:STDOUT: %interface.7: = interface_witness (%Convert.13) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.2, %Convert.13 [template] +// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.3(%int_32) [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_1.1, %Convert.12 [template] +// CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.5(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %struct_type.index.2: type = struct_type {.index: %i32} [template] // CHECK:STDOUT: %struct.2: %struct_type.index.2 = struct_value (%int_1.2) [template] -// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_1.2, %Convert.17 [template] -// CHECK:STDOUT: %Convert.specific_fn.5: = specific_function %Convert.bound.5, @Convert.4(%int_32) [template] +// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_1.2, %Convert.13 [template] +// CHECK:STDOUT: %Convert.specific_fn.5: = specific_function %Convert.bound.5, @Convert.3(%int_32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Bool = %import_ref.1 // CHECK:STDOUT: .Int = %import_ref.2 -// CHECK:STDOUT: .ImplicitAs = %import_ref.3 -// CHECK:STDOUT: .As = %import_ref.39 +// CHECK:STDOUT: .ImplicitAs = %import_ref.6 +// CHECK:STDOUT: .As = %import_ref.194 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -83,19 +81,15 @@ var d: i32 = a.({.index = 1 as i32}.index); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %bool.make_type.loc11: init type = call constants.%Bool() [template = bool] // 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_18.1: %tuple.type.1 = tuple_literal (%bool.make_type.loc11, %int.make_type_signed.loc11) +// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_18.1: %tuple.type.1 = tuple_literal (%bool.make_type.loc11, %i32.loc11) // CHECK:STDOUT: %.loc11_18.2: type = value_of_initializer %bool.make_type.loc11 [template = bool] // CHECK:STDOUT: %.loc11_18.3: type = converted %bool.make_type.loc11, %.loc11_18.2 [template = bool] -// CHECK:STDOUT: %.loc11_18.4: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_18.5: type = converted %int.make_type_signed.loc11, %.loc11_18.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_18.6: type = converted %.loc11_18.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %.loc11_18.4: type = converted %.loc11_18.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var // 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_8.1: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_signed.loc12, %.loc12_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: %bool.make_type.loc13: init type = call constants.%Bool() [template = bool] @@ -104,9 +98,7 @@ var d: i32 = a.({.index = 1 as i32}.index); // CHECK:STDOUT: %c.var: ref bool = var c // CHECK:STDOUT: %c: ref bool = bind_name c, %c.var // CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%int_32.loc14) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_8.1: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_8.2: type = converted %int.make_type_signed.loc14, %.loc14_8.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %d.var: ref %i32 = var d // CHECK:STDOUT: %d: ref %i32 = bind_name d, %d.var // CHECK:STDOUT: } @@ -118,7 +110,7 @@ var d: i32 = a.({.index = 1 as i32}.index); // CHECK:STDOUT: %.loc11_31.1: %tuple.type.3 = tuple_literal (%true, %int_34) // CHECK:STDOUT: %tuple.elem0.loc11: ref bool = tuple_access file.%a.var, element0 // CHECK:STDOUT: %.loc11_31.2: init bool = initialize_from %true to %tuple.elem0.loc11 [template = constants.%true] -// CHECK:STDOUT: %impl.elem0.loc11: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11: = bound_method %int_34, %impl.elem0.loc11 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11: = specific_function %Convert.bound.loc11, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %Convert.specific_fn.loc11(%int_34) [template = constants.%int_34.2] @@ -140,18 +132,16 @@ var d: i32 = a.({.index = 1 as i32}.index); // CHECK:STDOUT: %a.ref.loc13: ref %tuple.type.2 = name_ref a, file.%a // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // 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_23.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_23.2: type = converted %int.make_type_signed.loc13, %.loc13_23.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc13_20.1: %Convert.type.15 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.16] +// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc13_20.1: %Convert.type.11 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.12] // CHECK:STDOUT: %Convert.bound.loc13_20.1: = bound_method %int_0, %impl.elem0.loc13_20.1 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc13_20.1: = specific_function %Convert.bound.loc13_20.1, @Convert.7(constants.%int_32) [template = constants.%Convert.specific_fn.2] +// CHECK:STDOUT: %Convert.specific_fn.loc13_20.1: = specific_function %Convert.bound.loc13_20.1, @Convert.5(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc13_20.1: init %i32 = call %Convert.specific_fn.loc13_20.1(%int_0) [template = constants.%int_0.2] // CHECK:STDOUT: %.loc13_20.1: %i32 = value_of_initializer %int.convert_checked.loc13_20.1 [template = constants.%int_0.2] // CHECK:STDOUT: %.loc13_20.2: %i32 = converted %int_0, %.loc13_20.1 [template = constants.%int_0.2] -// CHECK:STDOUT: %impl.elem0.loc13_20.2: %Convert.type.6 = interface_witness_access constants.%interface.11, element0 [template = constants.%Convert.17] +// CHECK:STDOUT: %impl.elem0.loc13_20.2: %Convert.type.5 = interface_witness_access constants.%interface.7, element0 [template = constants.%Convert.13] // CHECK:STDOUT: %Convert.bound.loc13_20.2: = bound_method %.loc13_20.2, %impl.elem0.loc13_20.2 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc13_20.2: = specific_function %Convert.bound.loc13_20.2, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] +// CHECK:STDOUT: %Convert.specific_fn.loc13_20.2: = specific_function %Convert.bound.loc13_20.2, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc13_20.2: init Core.IntLiteral = call %Convert.specific_fn.loc13_20.2(%.loc13_20.2) [template = constants.%int_0.1] // CHECK:STDOUT: %.loc13_20.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc13_20.2 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc13_20.4: Core.IntLiteral = converted %.loc13_20.2, %.loc13_20.3 [template = constants.%int_0.1] @@ -161,12 +151,10 @@ var d: i32 = a.({.index = 1 as i32}.index); // CHECK:STDOUT: %a.ref.loc14: ref %tuple.type.2 = name_ref a, file.%a // CHECK:STDOUT: %int_1.loc14: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%int_32.loc14) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_32.1: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_32.2: type = converted %int.make_type_signed.loc14, %.loc14_32.1 [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc14_29: %Convert.type.15 = interface_witness_access constants.%interface.10, element0 [template = constants.%Convert.16] +// CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %impl.elem0.loc14_29: %Convert.type.11 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.12] // CHECK:STDOUT: %Convert.bound.loc14_29: = bound_method %int_1.loc14, %impl.elem0.loc14_29 [template = constants.%Convert.bound.4] -// CHECK:STDOUT: %Convert.specific_fn.loc14_29: = specific_function %Convert.bound.loc14_29, @Convert.7(constants.%int_32) [template = constants.%Convert.specific_fn.4] +// CHECK:STDOUT: %Convert.specific_fn.loc14_29: = specific_function %Convert.bound.loc14_29, @Convert.5(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc14_29: init %i32 = call %Convert.specific_fn.loc14_29(%int_1.loc14) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc14_29.1: %i32 = value_of_initializer %int.convert_checked.loc14_29 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc14_29.2: %i32 = converted %int_1.loc14, %.loc14_29.1 [template = constants.%int_1.2] @@ -174,9 +162,9 @@ var d: i32 = a.({.index = 1 as i32}.index); // CHECK:STDOUT: %struct.loc14: %struct_type.index.2 = struct_value (%.loc14_29.2) [template = constants.%struct.2] // CHECK:STDOUT: %.loc14_35.2: %struct_type.index.2 = converted %.loc14_35.1, %struct.loc14 [template = constants.%struct.2] // CHECK:STDOUT: %.loc14_36.1: %i32 = struct_access %.loc14_35.2, element0 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc14_36: %Convert.type.6 = interface_witness_access constants.%interface.11, element0 [template = constants.%Convert.17] +// CHECK:STDOUT: %impl.elem0.loc14_36: %Convert.type.5 = interface_witness_access constants.%interface.7, element0 [template = constants.%Convert.13] // CHECK:STDOUT: %Convert.bound.loc14_36: = bound_method %.loc14_36.1, %impl.elem0.loc14_36 [template = constants.%Convert.bound.5] -// CHECK:STDOUT: %Convert.specific_fn.loc14_36: = specific_function %Convert.bound.loc14_36, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.5] +// CHECK:STDOUT: %Convert.specific_fn.loc14_36: = specific_function %Convert.bound.loc14_36, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.5] // CHECK:STDOUT: %int.convert_checked.loc14_36: init Core.IntLiteral = call %Convert.specific_fn.loc14_36(%.loc14_36.1) [template = constants.%int_1.1] // CHECK:STDOUT: %.loc14_36.2: Core.IntLiteral = value_of_initializer %int.convert_checked.loc14_36 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc14_36.3: Core.IntLiteral = converted %.loc14_36.1, %.loc14_36.2 [template = constants.%int_1.1] diff --git a/toolchain/check/testdata/tuple/access/return_value_access.carbon b/toolchain/check/testdata/tuple/access/return_value_access.carbon index 0e09e23267bc..eeacb6305b0b 100644 --- a/toolchain/check/testdata/tuple/access/return_value_access.carbon +++ b/toolchain/check/testdata/tuple/access/return_value_access.carbon @@ -18,9 +18,7 @@ fn Run() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -28,10 +26,10 @@ fn Run() -> i32 { // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_0.2) [template] @@ -42,7 +40,7 @@ fn Run() -> i32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -60,11 +58,9 @@ fn Run() -> i32 { // CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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_16.1: %tuple.type.1 = tuple_literal (%int.make_type_signed) -// CHECK:STDOUT: %.loc11_16.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_16.3: type = converted %int.make_type_signed, %.loc11_16.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_16.4: type = converted %.loc11_16.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_16.1: %tuple.type.1 = tuple_literal (%i32) +// CHECK:STDOUT: %.loc11_16.2: type = converted %.loc11_16.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %return.param: ref %tuple.type.2 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %tuple.type.2 = return_slot %return.param // CHECK:STDOUT: } @@ -73,23 +69,19 @@ fn Run() -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // 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_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_13.2: type = converted %int.make_type_signed, %.loc13_13.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [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: %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_17.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc13_17.2: type = converted %int.make_type_signed, %.loc13_17.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %tuple.type.2 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc11_30.1: %tuple.type.3 = tuple_literal (%int_0) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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] diff --git a/toolchain/check/testdata/tuple/fail_assign_nested.carbon b/toolchain/check/testdata/tuple/fail_assign_nested.carbon index 2e6a766d0390..cb2450977b11 100644 --- a/toolchain/check/testdata/tuple/fail_assign_nested.carbon +++ b/toolchain/check/testdata/tuple/fail_assign_nested.carbon @@ -17,9 +17,7 @@ var x: ((i32, i32), (i32, i32)) = ((1, 2, 3), (4, 5, 6)); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%tuple.type.1, %tuple.type.1) [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (%i32, %i32) [template] @@ -36,7 +34,7 @@ var x: ((i32, i32), (i32, i32)) = ((1, 2, 3), (4, 5, 6)); // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -49,27 +47,19 @@ var x: ((i32, i32), (i32, i32)) = ((1, 2, 3), (4, 5, 6)); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int_32.loc14_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_10: init type = call constants.%Int(%int_32.loc14_10) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_10: type = class_type @Int, @Int(constants.%int_32) [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_18: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc14_10, %int.make_type_signed.loc14_15) +// CHECK:STDOUT: %i32.loc14_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_18: %tuple.type.1 = tuple_literal (%i32.loc14_10, %i32.loc14_15) // CHECK:STDOUT: %int_32.loc14_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_22: init type = call constants.%Int(%int_32.loc14_22) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc14_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_27: init type = call constants.%Int(%int_32.loc14_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_30: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc14_22, %int.make_type_signed.loc14_27) +// CHECK:STDOUT: %i32.loc14_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_30: %tuple.type.1 = tuple_literal (%i32.loc14_22, %i32.loc14_27) // CHECK:STDOUT: %.loc14_31.1: %tuple.type.2 = tuple_literal (%.loc14_18, %.loc14_30) -// CHECK:STDOUT: %.loc14_31.2: type = value_of_initializer %int.make_type_signed.loc14_10 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_31.3: type = converted %int.make_type_signed.loc14_10, %.loc14_31.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_31.4: type = value_of_initializer %int.make_type_signed.loc14_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_31.5: type = converted %int.make_type_signed.loc14_15, %.loc14_31.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_31.6: type = converted %.loc14_18, constants.%tuple.type.3 [template = constants.%tuple.type.3] -// CHECK:STDOUT: %.loc14_31.7: type = value_of_initializer %int.make_type_signed.loc14_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_31.8: type = converted %int.make_type_signed.loc14_22, %.loc14_31.7 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_31.9: type = value_of_initializer %int.make_type_signed.loc14_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_31.10: type = converted %int.make_type_signed.loc14_27, %.loc14_31.9 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_31.11: type = converted %.loc14_30, constants.%tuple.type.3 [template = constants.%tuple.type.3] -// CHECK:STDOUT: %.loc14_31.12: type = converted %.loc14_31.1, constants.%tuple.type.4 [template = constants.%tuple.type.4] +// CHECK:STDOUT: %.loc14_31.2: type = converted %.loc14_18, constants.%tuple.type.3 [template = constants.%tuple.type.3] +// CHECK:STDOUT: %.loc14_31.3: type = converted %.loc14_30, constants.%tuple.type.3 [template = constants.%tuple.type.3] +// CHECK:STDOUT: %.loc14_31.4: type = converted %.loc14_31.1, constants.%tuple.type.4 [template = constants.%tuple.type.4] // CHECK:STDOUT: %x.var: ref %tuple.type.4 = var x // CHECK:STDOUT: %x: ref %tuple.type.4 = bind_name x, %x.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon b/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon index d211e442a27e..e90255e4e713 100644 --- a/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon +++ b/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon @@ -20,19 +20,17 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [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: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %float: f64 = float_literal 65.890000000000001 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, f64) [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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } @@ -40,7 +38,7 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -53,15 +51,11 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int_32.loc17_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc17_9: init type = call constants.%Int(%int_32.loc17_9) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc17_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc17_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc17_14: init type = call constants.%Int(%int_32.loc17_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc17_9, %int.make_type_signed.loc17_14) -// CHECK:STDOUT: %.loc17_17.2: type = value_of_initializer %int.make_type_signed.loc17_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_17.3: type = converted %int.make_type_signed.loc17_9, %.loc17_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_17.4: type = value_of_initializer %int.make_type_signed.loc17_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_17.5: type = converted %int.make_type_signed.loc17_14, %.loc17_17.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_17.6: type = converted %.loc17_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc17_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc17_17.1: %tuple.type.1 = tuple_literal (%i32.loc17_9, %i32.loc17_14) +// CHECK:STDOUT: %.loc17_17.2: type = converted %.loc17_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %x.var: ref %tuple.type.2 = var x // CHECK:STDOUT: %x: ref %tuple.type.2 = bind_name x, %x.var // CHECK:STDOUT: } @@ -71,7 +65,7 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %float: f64 = float_literal 65.890000000000001 [template = constants.%float] // CHECK:STDOUT: %.loc17_30.1: %tuple.type.3 = tuple_literal (%int_2, %float) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/tuple/fail_nested_incomplete.carbon b/toolchain/check/testdata/tuple/fail_nested_incomplete.carbon index bdff95523269..4db900e89f70 100644 --- a/toolchain/check/testdata/tuple/fail_nested_incomplete.carbon +++ b/toolchain/check/testdata/tuple/fail_nested_incomplete.carbon @@ -25,9 +25,7 @@ var p: Incomplete* = &t[1]; // CHECK:STDOUT: constants { // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %Incomplete) [template] // CHECK:STDOUT: %ptr: type = ptr_type %Incomplete [template] @@ -36,7 +34,7 @@ var p: Incomplete* = &t[1]; // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -52,12 +50,10 @@ var p: Incomplete* = &t[1]; // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Incomplete.decl: type = class_decl @Incomplete [template = constants.%Incomplete] {} {} // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %Incomplete.ref.loc19: type = name_ref Incomplete, %Incomplete.decl [template = constants.%Incomplete] -// CHECK:STDOUT: %.loc19_24.1: %tuple.type.1 = tuple_literal (%int.make_type_signed, %Incomplete.ref.loc19) -// CHECK:STDOUT: %.loc19_24.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc19_24.3: type = converted %int.make_type_signed, %.loc19_24.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_24.4: type = converted %.loc19_24.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %.loc19_24.1: %tuple.type.1 = tuple_literal (%i32, %Incomplete.ref.loc19) +// CHECK:STDOUT: %.loc19_24.2: type = converted %.loc19_24.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %t.var: ref = var t // CHECK:STDOUT: %t: ref = bind_name t, %t.var // CHECK:STDOUT: %Incomplete.ref.loc21: type = name_ref Incomplete, %Incomplete.decl [template = constants.%Incomplete] diff --git a/toolchain/check/testdata/tuple/fail_too_few_element.carbon b/toolchain/check/testdata/tuple/fail_too_few_element.carbon index b512d2be37d9..386963a35ada 100644 --- a/toolchain/check/testdata/tuple/fail_too_few_element.carbon +++ b/toolchain/check/testdata/tuple/fail_too_few_element.carbon @@ -17,9 +17,7 @@ var x: (i32, i32) = (2, ); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [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: %int_2: Core.IntLiteral = int_value 2 [template] @@ -28,7 +26,7 @@ var x: (i32, i32) = (2, ); // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -41,15 +39,11 @@ var x: (i32, i32) = (2, ); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int_32.loc14_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_9: init type = call constants.%Int(%int_32.loc14_9) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc14_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_14: init type = call constants.%Int(%int_32.loc14_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc14_9, %int.make_type_signed.loc14_14) -// CHECK:STDOUT: %.loc14_17.2: type = value_of_initializer %int.make_type_signed.loc14_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_17.3: type = converted %int.make_type_signed.loc14_9, %.loc14_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_17.4: type = value_of_initializer %int.make_type_signed.loc14_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_17.5: type = converted %int.make_type_signed.loc14_14, %.loc14_17.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_17.6: type = converted %.loc14_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc14_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_17.1: %tuple.type.1 = tuple_literal (%i32.loc14_9, %i32.loc14_14) +// CHECK:STDOUT: %.loc14_17.2: type = converted %.loc14_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %x.var: ref %tuple.type.2 = var x // CHECK:STDOUT: %x: ref %tuple.type.2 = bind_name x, %x.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/fail_type_assign.carbon b/toolchain/check/testdata/tuple/fail_type_assign.carbon index 34ba3ef294c8..b35fd146b08e 100644 --- a/toolchain/check/testdata/tuple/fail_type_assign.carbon +++ b/toolchain/check/testdata/tuple/fail_type_assign.carbon @@ -20,9 +20,7 @@ var x: (i32, ) = (i32, ); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] // CHECK:STDOUT: } @@ -30,7 +28,7 @@ var x: (i32, ) = (i32, ); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -43,11 +41,9 @@ var x: (i32, ) = (i32, ); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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: %.loc17_14.1: %tuple.type.1 = tuple_literal (%int.make_type_signed) -// CHECK:STDOUT: %.loc17_14.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc17_14.3: type = converted %int.make_type_signed, %.loc17_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_14.4: type = converted %.loc17_14.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc17_14.1: %tuple.type.1 = tuple_literal (%i32) +// CHECK:STDOUT: %.loc17_14.2: type = converted %.loc17_14.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %x.var: ref %tuple.type.2 = var x // CHECK:STDOUT: %x: ref %tuple.type.2 = bind_name x, %x.var // CHECK:STDOUT: } @@ -55,9 +51,9 @@ var x: (i32, ) = (i32, ); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // 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: %.loc17_24.1: %tuple.type.1 = tuple_literal (%int.make_type_signed) -// CHECK:STDOUT: %.loc17_24.2: %i32 = converted %int.make_type_signed, [template = ] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc17_24.1: %tuple.type.1 = tuple_literal (%i32) +// CHECK:STDOUT: %.loc17_24.2: %i32 = converted %i32, [template = ] // CHECK:STDOUT: assign file.%x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/import.carbon b/toolchain/check/testdata/tuple/import.carbon index 3b9242177e5d..32a90df4b979 100644 --- a/toolchain/check/testdata/tuple/import.carbon +++ b/toolchain/check/testdata/tuple/import.carbon @@ -57,18 +57,16 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %tuple.1: %tuple.type.2 = tuple_value (%int_0.2) [template] @@ -84,14 +82,14 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %tuple.type.12: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %tuple.type.13: type = tuple_type (%tuple.type.11, %tuple.type.12) [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %tuple.2: %tuple.type.7 = tuple_value (%tuple.1, %int_1.2) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %tuple.3: %tuple.type.8 = tuple_value (%int_2.2, %int_3.2) [template] @@ -102,7 +100,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] // CHECK:STDOUT: %C.1: type = class_type @C, @C(%X) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.3: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %tuple.5: %tuple.type.8 = tuple_value (%int_1.2, %int_2.2) [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%tuple.5) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -112,7 +110,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -128,37 +126,27 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc4) -// CHECK:STDOUT: %.loc4_17.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_17.3: type = converted %int.make_type_signed.loc4, %.loc4_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_17.4: type = converted %.loc4_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_17.1: %tuple.type.1 = tuple_literal (%i32.loc4) +// CHECK:STDOUT: %.loc4_17.2: type = converted %.loc4_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a_ref.var: ref %tuple.type.2 = var a_ref // CHECK:STDOUT: %a_ref: ref %tuple.type.2 = bind_name a_ref, %a_ref.var // CHECK:STDOUT: %int_32.loc5_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_15: init type = call constants.%Int(%int_32.loc5_15) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc5_15) +// CHECK:STDOUT: %i32.loc5_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_19: %tuple.type.1 = tuple_literal (%i32.loc5_15) // CHECK:STDOUT: %int_32.loc5_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_22: init type = call constants.%Int(%int_32.loc5_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_25: %tuple.type.4 = tuple_literal (%.loc5_19, %int.make_type_signed.loc5_22) +// CHECK:STDOUT: %i32.loc5_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_25: %tuple.type.4 = tuple_literal (%.loc5_19, %i32.loc5_22) // CHECK:STDOUT: %int_32.loc5_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_29: init type = call constants.%Int(%int_32.loc5_29) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_29: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_34: init type = call constants.%Int(%int_32.loc5_34) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_37: %tuple.type.5 = tuple_literal (%int.make_type_signed.loc5_29, %int.make_type_signed.loc5_34) +// CHECK:STDOUT: %i32.loc5_34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_37: %tuple.type.5 = tuple_literal (%i32.loc5_29, %i32.loc5_34) // CHECK:STDOUT: %.loc5_38.1: %tuple.type.6 = tuple_literal (%.loc5_25, %.loc5_37) -// CHECK:STDOUT: %.loc5_38.2: type = value_of_initializer %int.make_type_signed.loc5_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_38.3: type = converted %int.make_type_signed.loc5_15, %.loc5_38.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_38.4: type = converted %.loc5_19, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc5_38.5: type = value_of_initializer %int.make_type_signed.loc5_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_38.6: type = converted %int.make_type_signed.loc5_22, %.loc5_38.5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_38.7: type = converted %.loc5_25, constants.%tuple.type.7 [template = constants.%tuple.type.7] -// CHECK:STDOUT: %.loc5_38.8: type = value_of_initializer %int.make_type_signed.loc5_29 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_38.9: type = converted %int.make_type_signed.loc5_29, %.loc5_38.8 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_38.10: type = value_of_initializer %int.make_type_signed.loc5_34 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_38.11: type = converted %int.make_type_signed.loc5_34, %.loc5_38.10 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_38.12: type = converted %.loc5_37, constants.%tuple.type.8 [template = constants.%tuple.type.8] -// CHECK:STDOUT: %.loc5_38.13: type = converted %.loc5_38.1, constants.%tuple.type.9 [template = constants.%tuple.type.9] +// CHECK:STDOUT: %.loc5_38.2: type = converted %.loc5_19, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %.loc5_38.3: type = converted %.loc5_25, constants.%tuple.type.7 [template = constants.%tuple.type.7] +// CHECK:STDOUT: %.loc5_38.4: type = converted %.loc5_37, constants.%tuple.type.8 [template = constants.%tuple.type.8] +// CHECK:STDOUT: %.loc5_38.5: type = converted %.loc5_38.1, constants.%tuple.type.9 [template = constants.%tuple.type.9] // CHECK:STDOUT: %b_ref.var: ref %tuple.type.9 = var b_ref // CHECK:STDOUT: %b_ref: ref %tuple.type.9 = bind_name b_ref, %b_ref.var // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] { @@ -166,15 +154,11 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %X.param_patt: %tuple.type.8 = value_param_pattern %X.patt.loc7_9.1, runtime_param [symbolic = %X.patt.loc7_9.2 (constants.%X.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc7_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_14: init type = call constants.%Int(%int_32.loc7_14) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc7_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_19: init type = call constants.%Int(%int_32.loc7_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_22.1: %tuple.type.5 = tuple_literal (%int.make_type_signed.loc7_14, %int.make_type_signed.loc7_19) -// CHECK:STDOUT: %.loc7_22.2: type = value_of_initializer %int.make_type_signed.loc7_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_22.3: type = converted %int.make_type_signed.loc7_14, %.loc7_22.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_22.4: type = value_of_initializer %int.make_type_signed.loc7_19 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_22.5: type = converted %int.make_type_signed.loc7_19, %.loc7_22.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_22.6: type = converted %.loc7_22.1, constants.%tuple.type.8 [template = constants.%tuple.type.8] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_22.1: %tuple.type.5 = tuple_literal (%i32.loc7_14, %i32.loc7_19) +// CHECK:STDOUT: %.loc7_22.2: type = converted %.loc7_22.1, constants.%tuple.type.8 [template = constants.%tuple.type.8] // CHECK:STDOUT: %X.param: %tuple.type.8 = value_param runtime_param // CHECK:STDOUT: %X.loc7_9.1: %tuple.type.8 = bind_symbolic_name X, 0, %X.param [symbolic = %X.loc7_9.2 (constants.%X)] // CHECK:STDOUT: } @@ -186,13 +170,13 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc9_18.1: %tuple.type.12 = tuple_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc9_18.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_18.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_18.1: = bound_method %int_1, %impl.elem0.loc9_18.1 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc9_18.1: = specific_function %Convert.bound.loc9_18.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc9_18.1: init %i32 = call %Convert.specific_fn.loc9_18.1(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc9_18.2: %i32 = value_of_initializer %int.convert_checked.loc9_18.1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc9_18.3: %i32 = converted %int_1, %.loc9_18.2 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc9_18.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc9_18.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc9_18.2: = bound_method %int_2, %impl.elem0.loc9_18.2 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc9_18.2: = specific_function %Convert.bound.loc9_18.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc9_18.2: init %i32 = call %Convert.specific_fn.loc9_18.2(%int_2) [template = constants.%int_2.2] @@ -213,7 +197,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.3] +// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.1 @@ -227,7 +211,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0.loc4: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc4_24.1: %tuple.type.3 = tuple_literal (%int_0.loc4) -// CHECK:STDOUT: %impl.elem0.loc4: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc4: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc4: = bound_method %int_0.loc4, %impl.elem0.loc4 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc4: = specific_function %Convert.bound.loc4, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc4: init %i32 = call %Convert.specific_fn.loc4(%int_0.loc4) [template = constants.%int_0.2] @@ -243,7 +227,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc5_59.1: %tuple.type.12 = tuple_literal (%int_2, %int_3) // CHECK:STDOUT: %.loc5_60.1: %tuple.type.13 = tuple_literal (%.loc5_51.1, %.loc5_59.1) -// CHECK:STDOUT: %impl.elem0.loc5_47: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc5_47: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc5_47: = bound_method %int_0.loc5, %impl.elem0.loc5_47 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc5_47: = specific_function %Convert.bound.loc5_47, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc5_47: init %i32 = call %Convert.specific_fn.loc5_47(%int_0.loc5) [template = constants.%int_0.2] @@ -253,7 +237,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %.loc5_47.3: init %tuple.type.2 = tuple_init (%.loc5_47.2) to %tuple.elem0.loc5_51 [template = constants.%tuple.1] // CHECK:STDOUT: %.loc5_51.2: init %tuple.type.2 = converted %.loc5_47.1, %.loc5_47.3 [template = constants.%tuple.1] // CHECK:STDOUT: %.loc5_51.3: init %tuple.type.2 = initialize_from %.loc5_51.2 to %tuple.elem0.loc5_51 [template = constants.%tuple.1] -// CHECK:STDOUT: %impl.elem0.loc5_51: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc5_51: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc5_51: = bound_method %int_1, %impl.elem0.loc5_51 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc5_51: = specific_function %Convert.bound.loc5_51, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc5_51: init %i32 = call %Convert.specific_fn.loc5_51(%int_1) [template = constants.%int_1.2] @@ -262,7 +246,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %.loc5_51.5: init %i32 = initialize_from %.loc5_51.4 to %tuple.elem1.loc5_51 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc5_51.6: init %tuple.type.7 = tuple_init (%.loc5_51.3, %.loc5_51.5) to %tuple.elem0.loc5_60 [template = constants.%tuple.2] // CHECK:STDOUT: %.loc5_60.2: init %tuple.type.7 = converted %.loc5_51.1, %.loc5_51.6 [template = constants.%tuple.2] -// CHECK:STDOUT: %impl.elem0.loc5_59.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc5_59.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc5_59.1: = bound_method %int_2, %impl.elem0.loc5_59.1 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc5_59.1: = specific_function %Convert.bound.loc5_59.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc5_59.1: init %i32 = call %Convert.specific_fn.loc5_59.1(%int_2) [template = constants.%int_2.2] @@ -270,7 +254,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %tuple.elem1.loc5_60: ref %tuple.type.8 = tuple_access file.%b_ref.var, element1 // CHECK:STDOUT: %tuple.elem0.loc5_59: ref %i32 = tuple_access %tuple.elem1.loc5_60, element0 // CHECK:STDOUT: %.loc5_59.3: init %i32 = initialize_from %.loc5_59.2 to %tuple.elem0.loc5_59 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc5_59.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc5_59.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc5_59.2: = bound_method %int_3, %impl.elem0.loc5_59.2 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc5_59.2: = specific_function %Convert.bound.loc5_59.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc5_59.2: init %i32 = call %Convert.specific_fn.loc5_59.2(%int_3) [template = constants.%int_3.2] @@ -299,9 +283,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (%tuple.type.1, type) [template] @@ -313,20 +295,20 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %X: %tuple.type.7 = bind_symbolic_name X, 0 [symbolic] // CHECK:STDOUT: %X.patt: %tuple.type.7 = symbolic_binding_pattern X, 0 [symbolic] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %tuple.type.10: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.1, @ImplicitAs(%i32) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %tuple: %tuple.type.7 = tuple_value (%int_1.2, %int_2.2) [template] @@ -341,13 +323,13 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, C, loaded [template = constants.%C.generic] // CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, F, loaded [template = constants.%F] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref.39 -// CHECK:STDOUT: .ImplicitAs = %import_ref.42 +// CHECK:STDOUT: .Int = %import_ref.194 +// CHECK:STDOUT: .ImplicitAs = %import_ref.197 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.40: = import_ref Implicit//default, loc7_26, loaded [template = constants.%complete_type.1] -// CHECK:STDOUT: %import_ref.41 = import_ref Implicit//default, inst473 [no loc], unloaded +// CHECK:STDOUT: %import_ref.195: = import_ref Implicit//default, loc7_26, loaded [template = constants.%complete_type.3] +// CHECK:STDOUT: %import_ref.196 = import_ref Implicit//default, inst637 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -365,50 +347,40 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core // 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: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc4) -// 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: %.loc4_13.4: type = converted %.loc4_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_13.1: %tuple.type.1 = tuple_literal (%i32.loc4) +// CHECK:STDOUT: %.loc4_13.2: type = converted %.loc4_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var // CHECK:STDOUT: %int_32.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_11: init type = call constants.%Int(%int_32.loc5_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_15: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc5_11) +// CHECK:STDOUT: %i32.loc5_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_15: %tuple.type.1 = tuple_literal (%i32.loc5_11) // CHECK:STDOUT: %int_32.loc5_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_18: init type = call constants.%Int(%int_32.loc5_18) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_21: %tuple.type.3 = tuple_literal (%.loc5_15, %int.make_type_signed.loc5_18) +// CHECK:STDOUT: %i32.loc5_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_21: %tuple.type.3 = tuple_literal (%.loc5_15, %i32.loc5_18) // CHECK:STDOUT: %int_32.loc5_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_25: init type = call constants.%Int(%int_32.loc5_25) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc5_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_30: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc5_30: init type = call constants.%Int(%int_32.loc5_30) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_33: %tuple.type.4 = tuple_literal (%int.make_type_signed.loc5_25, %int.make_type_signed.loc5_30) +// CHECK:STDOUT: %i32.loc5_30: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc5_33: %tuple.type.4 = tuple_literal (%i32.loc5_25, %i32.loc5_30) // CHECK:STDOUT: %.loc5_34.1: %tuple.type.5 = tuple_literal (%.loc5_21, %.loc5_33) -// CHECK:STDOUT: %.loc5_34.2: type = value_of_initializer %int.make_type_signed.loc5_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_34.3: type = converted %int.make_type_signed.loc5_11, %.loc5_34.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_34.4: type = converted %.loc5_15, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc5_34.5: type = value_of_initializer %int.make_type_signed.loc5_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_34.6: type = converted %int.make_type_signed.loc5_18, %.loc5_34.5 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_34.7: type = converted %.loc5_21, constants.%tuple.type.6 [template = constants.%tuple.type.6] -// CHECK:STDOUT: %.loc5_34.8: type = value_of_initializer %int.make_type_signed.loc5_25 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_34.9: type = converted %int.make_type_signed.loc5_25, %.loc5_34.8 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_34.10: type = value_of_initializer %int.make_type_signed.loc5_30 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_34.11: type = converted %int.make_type_signed.loc5_30, %.loc5_34.10 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_34.12: type = converted %.loc5_33, constants.%tuple.type.7 [template = constants.%tuple.type.7] -// CHECK:STDOUT: %.loc5_34.13: type = converted %.loc5_34.1, constants.%tuple.type.8 [template = constants.%tuple.type.8] +// CHECK:STDOUT: %.loc5_34.2: type = converted %.loc5_15, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %.loc5_34.3: type = converted %.loc5_21, constants.%tuple.type.6 [template = constants.%tuple.type.6] +// CHECK:STDOUT: %.loc5_34.4: type = converted %.loc5_33, constants.%tuple.type.7 [template = constants.%tuple.type.7] +// CHECK:STDOUT: %.loc5_34.5: type = converted %.loc5_34.1, constants.%tuple.type.8 [template = constants.%tuple.type.8] // CHECK:STDOUT: %b.var: ref %tuple.type.8 = var b // CHECK:STDOUT: %b: ref %tuple.type.8 = bind_name b, %b.var // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.generic] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc6_15.1: %tuple.type.10 = tuple_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc6_15.1: %Convert.type.13 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc6_15.1: %Convert.type.9 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc6_15.1: = bound_method %int_1, %impl.elem0.loc6_15.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc6_15.1: = specific_function %Convert.bound.loc6_15.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc6_15.1: init %i32 = call %Convert.specific_fn.loc6_15.1(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc6_15.2: %i32 = value_of_initializer %int.convert_checked.loc6_15.1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc6_15.3: %i32 = converted %int_1, %.loc6_15.2 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc6_15.2: %Convert.type.13 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc6_15.2: %Convert.type.9 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc6_15.2: = bound_method %int_2, %impl.elem0.loc6_15.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc6_15.2: = specific_function %Convert.bound.loc6_15.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc6_15.2: init %i32 = call %Convert.specific_fn.loc6_15.2(%int_2) [template = constants.%int_2.2] @@ -429,8 +401,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.41 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.40 +// CHECK:STDOUT: .Self = imports.%import_ref.196 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.195 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -497,12 +469,12 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: --- fail_bad_type.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %X: %tuple.type.1 = bind_symbolic_name X, 0 [symbolic] // CHECK:STDOUT: %X.patt: %tuple.type.1 = symbolic_binding_pattern X, 0 [symbolic] @@ -527,8 +499,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.39: = import_ref Implicit//default, loc7_26, loaded [template = constants.%complete_type] -// CHECK:STDOUT: %import_ref.40 = import_ref Implicit//default, inst473 [no loc], unloaded +// CHECK:STDOUT: %import_ref.194: = import_ref Implicit//default, loc7_26, loaded [template = constants.%complete_type.3] +// CHECK:STDOUT: %import_ref.195 = import_ref Implicit//default, inst637 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -560,8 +532,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.40 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.39 +// CHECK:STDOUT: .Self = imports.%import_ref.195 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.194 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -591,26 +563,26 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: --- fail_bad_value.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %empty_struct_type [template] -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %int_32 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %X: %tuple.type.1 = bind_symbolic_name X, 0 [symbolic] // CHECK:STDOUT: %X.patt: %tuple.type.1 = symbolic_binding_pattern X, 0 [symbolic] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.1, @ImplicitAs(%i32) [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: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_4.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: %tuple.1: %tuple.type.1 = tuple_value (%int_3.2, %int_4.2) [template] @@ -629,12 +601,12 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, C, loaded [template = constants.%C.generic] // CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, F, loaded [template = constants.%F] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .ImplicitAs = %import_ref.41 +// CHECK:STDOUT: .ImplicitAs = %import_ref.196 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.39: = import_ref Implicit//default, loc7_26, loaded [template = constants.%complete_type.1] -// CHECK:STDOUT: %import_ref.40 = import_ref Implicit//default, inst473 [no loc], unloaded +// CHECK:STDOUT: %import_ref.194: = import_ref Implicit//default, loc7_26, loaded [template = constants.%complete_type.3] +// CHECK:STDOUT: %import_ref.195 = import_ref Implicit//default, inst637 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -653,13 +625,13 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] // CHECK:STDOUT: %.loc10_19.1: %tuple.type.2 = tuple_literal (%int_3, %int_4) -// CHECK:STDOUT: %impl.elem0.loc10_19.1: %Convert.type.13 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc10_19.1: %Convert.type.9 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc10_19.1: = bound_method %int_3, %impl.elem0.loc10_19.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc10_19.1: = specific_function %Convert.bound.loc10_19.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc10_19.1: init %i32 = call %Convert.specific_fn.loc10_19.1(%int_3) [template = constants.%int_3.2] // CHECK:STDOUT: %.loc10_19.2: %i32 = value_of_initializer %int.convert_checked.loc10_19.1 [template = constants.%int_3.2] // CHECK:STDOUT: %.loc10_19.3: %i32 = converted %int_3, %.loc10_19.2 [template = constants.%int_3.2] -// CHECK:STDOUT: %impl.elem0.loc10_19.2: %Convert.type.13 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc10_19.2: %Convert.type.9 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc10_19.2: = bound_method %int_4, %impl.elem0.loc10_19.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc10_19.2: = specific_function %Convert.bound.loc10_19.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc10_19.2: init %i32 = call %Convert.specific_fn.loc10_19.2(%int_4) [template = constants.%int_4.2] @@ -680,8 +652,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.40 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.39 +// CHECK:STDOUT: .Self = imports.%import_ref.195 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.194 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/tuple/nested_tuple.carbon b/toolchain/check/testdata/tuple/nested_tuple.carbon index 171527e50217..1ead3759c074 100644 --- a/toolchain/check/testdata/tuple/nested_tuple.carbon +++ b/toolchain/check/testdata/tuple/nested_tuple.carbon @@ -14,9 +14,7 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%tuple.type.1, type) [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (%i32, %i32) [template] @@ -27,17 +25,17 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: %int_6.1: Core.IntLiteral = int_value 6 [template] // CHECK:STDOUT: %tuple.type.7: type = tuple_type (%tuple.type.6, 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_76.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_76.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_76.2: %i32 = int_value 76 [template] // CHECK:STDOUT: %tuple.1: %tuple.type.3 = tuple_value (%int_12.2, %int_76.2) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_6.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_6.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_6.2: %i32 = int_value 6 [template] // CHECK:STDOUT: %tuple.2: %tuple.type.4 = tuple_value (%tuple.1, %int_6.2) [template] @@ -46,7 +44,7 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -59,21 +57,15 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int_32.loc11_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_10: init type = call constants.%Int(%int_32.loc11_10) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_15: init type = call constants.%Int(%int_32.loc11_15) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_18: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_10, %int.make_type_signed.loc11_15) +// CHECK:STDOUT: %i32.loc11_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_18: %tuple.type.1 = tuple_literal (%i32.loc11_10, %i32.loc11_15) // CHECK:STDOUT: %int_32.loc11_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_21: init type = call constants.%Int(%int_32.loc11_21) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_24.1: %tuple.type.2 = tuple_literal (%.loc11_18, %int.make_type_signed.loc11_21) -// CHECK:STDOUT: %.loc11_24.2: type = value_of_initializer %int.make_type_signed.loc11_10 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_24.3: type = converted %int.make_type_signed.loc11_10, %.loc11_24.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_24.4: type = value_of_initializer %int.make_type_signed.loc11_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_24.5: type = converted %int.make_type_signed.loc11_15, %.loc11_24.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_24.6: type = converted %.loc11_18, constants.%tuple.type.3 [template = constants.%tuple.type.3] -// CHECK:STDOUT: %.loc11_24.7: type = value_of_initializer %int.make_type_signed.loc11_21 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_24.8: type = converted %int.make_type_signed.loc11_21, %.loc11_24.7 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_24.9: type = converted %.loc11_24.1, constants.%tuple.type.4 [template = constants.%tuple.type.4] +// CHECK:STDOUT: %i32.loc11_21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_24.1: %tuple.type.2 = tuple_literal (%.loc11_18, %i32.loc11_21) +// CHECK:STDOUT: %.loc11_24.2: type = converted %.loc11_18, constants.%tuple.type.3 [template = constants.%tuple.type.3] +// CHECK:STDOUT: %.loc11_24.3: type = converted %.loc11_24.1, constants.%tuple.type.4 [template = constants.%tuple.type.4] // CHECK:STDOUT: %x.var: ref %tuple.type.4 = var x // CHECK:STDOUT: %x: ref %tuple.type.4 = bind_name x, %x.var // CHECK:STDOUT: } @@ -85,7 +77,7 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: %.loc11_36.1: %tuple.type.6 = tuple_literal (%int_12, %int_76) // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.1] // CHECK:STDOUT: %.loc11_40.1: %tuple.type.7 = tuple_literal (%.loc11_36.1, %int_6) -// CHECK:STDOUT: %impl.elem0.loc11_36.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_36.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_36.1: = bound_method %int_12, %impl.elem0.loc11_36.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_36.1: = specific_function %Convert.bound.loc11_36.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_36.1: init %i32 = call %Convert.specific_fn.loc11_36.1(%int_12) [template = constants.%int_12.2] @@ -93,7 +85,7 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: %tuple.elem0.loc11_40: ref %tuple.type.3 = tuple_access file.%x.var, element0 // CHECK:STDOUT: %tuple.elem0.loc11_36: ref %i32 = tuple_access %tuple.elem0.loc11_40, element0 // CHECK:STDOUT: %.loc11_36.3: init %i32 = initialize_from %.loc11_36.2 to %tuple.elem0.loc11_36 [template = constants.%int_12.2] -// CHECK:STDOUT: %impl.elem0.loc11_36.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_36.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_36.2: = bound_method %int_76, %impl.elem0.loc11_36.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_36.2: = specific_function %Convert.bound.loc11_36.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_36.2: init %i32 = call %Convert.specific_fn.loc11_36.2(%int_76) [template = constants.%int_76.2] @@ -102,7 +94,7 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: %.loc11_36.5: init %i32 = initialize_from %.loc11_36.4 to %tuple.elem1.loc11_36 [template = constants.%int_76.2] // CHECK:STDOUT: %.loc11_36.6: init %tuple.type.3 = tuple_init (%.loc11_36.3, %.loc11_36.5) to %tuple.elem0.loc11_40 [template = constants.%tuple.1] // CHECK:STDOUT: %.loc11_40.2: init %tuple.type.3 = converted %.loc11_36.1, %.loc11_36.6 [template = constants.%tuple.1] -// CHECK:STDOUT: %impl.elem0.loc11_40: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_40: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_40: = bound_method %int_6, %impl.elem0.loc11_40 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc11_40: = specific_function %Convert.bound.loc11_40, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc11_40: init %i32 = call %Convert.specific_fn.loc11_40(%int_6) [template = constants.%int_6.2] diff --git a/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon b/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon index 1fae1ef7835b..3b9604201bf2 100644 --- a/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon +++ b/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon @@ -22,9 +22,7 @@ fn H() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32, %i32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -41,13 +39,13 @@ fn H() { // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %tuple.type.9: type = tuple_type (Core.IntLiteral, %tuple.type.2, 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = 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 %int_2.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } @@ -55,7 +53,7 @@ fn H() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -74,19 +72,13 @@ fn H() { // CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_12: init type = call constants.%Int(%int_32.loc11_12) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_17: init type = call constants.%Int(%int_32.loc11_17) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_22: init type = call constants.%Int(%int_32.loc11_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_12, %int.make_type_signed.loc11_17, %int.make_type_signed.loc11_22) -// CHECK:STDOUT: %.loc11_25.2: type = value_of_initializer %int.make_type_signed.loc11_12 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.3: type = converted %int.make_type_signed.loc11_12, %.loc11_25.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.4: type = value_of_initializer %int.make_type_signed.loc11_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.5: type = converted %int.make_type_signed.loc11_17, %.loc11_25.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.6: type = value_of_initializer %int.make_type_signed.loc11_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.7: type = converted %int.make_type_signed.loc11_22, %.loc11_25.6 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_25.8: type = converted %.loc11_25.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc11_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_25.1: %tuple.type.1 = tuple_literal (%i32.loc11_12, %i32.loc11_17, %i32.loc11_22) +// CHECK:STDOUT: %.loc11_25.2: type = converted %.loc11_25.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %return.param: ref %tuple.type.2 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %tuple.type.2 = return_slot %return.param // CHECK:STDOUT: } @@ -99,35 +91,23 @@ fn H() { // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_32.loc14_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_12: init type = call constants.%Int(%int_32.loc14_12) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc14_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_17: init type = call constants.%Int(%int_32.loc14_17) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc14_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_22: init type = call constants.%Int(%int_32.loc14_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_25: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc14_12, %int.make_type_signed.loc14_17, %int.make_type_signed.loc14_22) +// CHECK:STDOUT: %i32.loc14_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_25: %tuple.type.1 = tuple_literal (%i32.loc14_12, %i32.loc14_17, %i32.loc14_22) // CHECK:STDOUT: %int_32.loc14_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_29: init type = call constants.%Int(%int_32.loc14_29) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_29: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc14_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_34: init type = call constants.%Int(%int_32.loc14_34) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc14_39: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_39: init type = call constants.%Int(%int_32.loc14_39) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_42: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc14_29, %int.make_type_signed.loc14_34, %int.make_type_signed.loc14_39) +// CHECK:STDOUT: %i32.loc14_39: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_42: %tuple.type.1 = tuple_literal (%i32.loc14_29, %i32.loc14_34, %i32.loc14_39) // CHECK:STDOUT: %.loc14_43.1: %tuple.type.3 = tuple_literal (%.loc14_25, %.loc14_42) -// CHECK:STDOUT: %.loc14_43.2: type = value_of_initializer %int.make_type_signed.loc14_12 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_43.3: type = converted %int.make_type_signed.loc14_12, %.loc14_43.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_43.4: type = value_of_initializer %int.make_type_signed.loc14_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_43.5: type = converted %int.make_type_signed.loc14_17, %.loc14_43.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_43.6: type = value_of_initializer %int.make_type_signed.loc14_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_43.7: type = converted %int.make_type_signed.loc14_22, %.loc14_43.6 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_43.8: type = converted %.loc14_25, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc14_43.9: type = value_of_initializer %int.make_type_signed.loc14_29 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_43.10: type = converted %int.make_type_signed.loc14_29, %.loc14_43.9 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_43.11: type = value_of_initializer %int.make_type_signed.loc14_34 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_43.12: type = converted %int.make_type_signed.loc14_34, %.loc14_43.11 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_43.13: type = value_of_initializer %int.make_type_signed.loc14_39 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_43.14: type = converted %int.make_type_signed.loc14_39, %.loc14_43.13 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_43.15: type = converted %.loc14_42, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc14_43.16: type = converted %.loc14_43.1, constants.%tuple.type.4 [template = constants.%tuple.type.4] +// CHECK:STDOUT: %.loc14_43.2: type = converted %.loc14_25, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %.loc14_43.3: type = converted %.loc14_42, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %.loc14_43.4: type = converted %.loc14_43.1, constants.%tuple.type.4 [template = constants.%tuple.type.4] // CHECK:STDOUT: %v.var: ref %tuple.type.4 = var v // CHECK:STDOUT: %v: ref %tuple.type.4 = bind_name v, %v.var // CHECK:STDOUT: %F.ref.loc14_48: %F.type = name_ref F, file.%F.decl [template = constants.%F] @@ -146,29 +126,19 @@ fn H() { // CHECK:STDOUT: fn @H() { // CHECK:STDOUT: !entry: // 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: %i32.loc18_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc18_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc18_17: init type = call constants.%Int(%int_32.loc18_17) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc18_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc18_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc18_22: init type = call constants.%Int(%int_32.loc18_22) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc18_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc18_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc18_27: init type = call constants.%Int(%int_32.loc18_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_30: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc18_17, %int.make_type_signed.loc18_22, %int.make_type_signed.loc18_27) +// CHECK:STDOUT: %i32.loc18_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_30: %tuple.type.1 = tuple_literal (%i32.loc18_17, %i32.loc18_22, %i32.loc18_27) // CHECK:STDOUT: %int_32.loc18_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc18_33: init type = call constants.%Int(%int_32.loc18_33) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_36.1: %tuple.type.6 = tuple_literal (%int.make_type_signed.loc18_11, %.loc18_30, %int.make_type_signed.loc18_33) -// CHECK:STDOUT: %.loc18_36.2: type = value_of_initializer %int.make_type_signed.loc18_11 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_36.3: type = converted %int.make_type_signed.loc18_11, %.loc18_36.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_36.4: type = value_of_initializer %int.make_type_signed.loc18_17 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_36.5: type = converted %int.make_type_signed.loc18_17, %.loc18_36.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_36.6: type = value_of_initializer %int.make_type_signed.loc18_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_36.7: type = converted %int.make_type_signed.loc18_22, %.loc18_36.6 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_36.8: type = value_of_initializer %int.make_type_signed.loc18_27 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_36.9: type = converted %int.make_type_signed.loc18_27, %.loc18_36.8 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_36.10: type = converted %.loc18_30, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc18_36.11: type = value_of_initializer %int.make_type_signed.loc18_33 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_36.12: type = converted %int.make_type_signed.loc18_33, %.loc18_36.11 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_36.13: type = converted %.loc18_36.1, constants.%tuple.type.7 [template = constants.%tuple.type.7] +// CHECK:STDOUT: %i32.loc18_33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc18_36.1: %tuple.type.6 = tuple_literal (%i32.loc18_11, %.loc18_30, %i32.loc18_33) +// CHECK:STDOUT: %.loc18_36.2: type = converted %.loc18_30, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %.loc18_36.3: type = converted %.loc18_36.1, constants.%tuple.type.7 [template = constants.%tuple.type.7] // CHECK:STDOUT: %v.var: ref %tuple.type.7 = var v // CHECK:STDOUT: %v: ref %tuple.type.7 = bind_name v, %v.var // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] @@ -177,14 +147,14 @@ fn H() { // CHECK:STDOUT: %F.call: init %tuple.type.2 = call %F.ref() to %tuple.elem1 // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc18_50.1: %tuple.type.9 = tuple_literal (%int_1, %F.call, %int_2) -// CHECK:STDOUT: %impl.elem0.loc18_50.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc18_50.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc18_50.1: = bound_method %int_1, %impl.elem0.loc18_50.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc18_50.1: = specific_function %Convert.bound.loc18_50.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc18_50.1: init %i32 = call %Convert.specific_fn.loc18_50.1(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc18_50.2: init %i32 = converted %int_1, %int.convert_checked.loc18_50.1 [template = constants.%int_1.2] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %v.var, element0 // CHECK:STDOUT: %.loc18_50.3: init %i32 = initialize_from %.loc18_50.2 to %tuple.elem0 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc18_50.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc18_50.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc18_50.2: = bound_method %int_2, %impl.elem0.loc18_50.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc18_50.2: = specific_function %Convert.bound.loc18_50.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc18_50.2: init %i32 = call %Convert.specific_fn.loc18_50.2(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/tuple/one_element.carbon b/toolchain/check/testdata/tuple/one_element.carbon index 46e962d71c4d..01be2b758d36 100644 --- a/toolchain/check/testdata/tuple/one_element.carbon +++ b/toolchain/check/testdata/tuple/one_element.carbon @@ -15,18 +15,16 @@ var y: (i32,) = x; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_4.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_4.2) [template] @@ -35,7 +33,7 @@ var y: (i32,) = x; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -49,19 +47,15 @@ var y: (i32,) = x; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // 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_13.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11) -// CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13.3: type = converted %int.make_type_signed.loc11, %.loc11_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13.4: type = converted %.loc11_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_13.1: %tuple.type.1 = tuple_literal (%i32.loc11) +// CHECK:STDOUT: %.loc11_13.2: type = converted %.loc11_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %x.var: ref %tuple.type.2 = var x // CHECK:STDOUT: %x: ref %tuple.type.2 = bind_name x, %x.var // 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_13.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc12) -// CHECK:STDOUT: %.loc12_13.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.3: type = converted %int.make_type_signed.loc12, %.loc12_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_13.4: type = converted %.loc12_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_13.1: %tuple.type.1 = tuple_literal (%i32.loc12) +// CHECK:STDOUT: %.loc12_13.2: type = converted %.loc12_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %y.var: ref %tuple.type.2 = var y // CHECK:STDOUT: %y: ref %tuple.type.2 = bind_name y, %y.var // CHECK:STDOUT: } @@ -70,7 +64,7 @@ var y: (i32,) = x; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] // CHECK:STDOUT: %.loc11_20.1: %tuple.type.3 = tuple_literal (%int_4) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_4, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = 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_4) [template = constants.%int_4.2] diff --git a/toolchain/check/testdata/tuple/two_elements.carbon b/toolchain/check/testdata/tuple/two_elements.carbon index 6f25825be6ab..b2f6abf8d50c 100644 --- a/toolchain/check/testdata/tuple/two_elements.carbon +++ b/toolchain/check/testdata/tuple/two_elements.carbon @@ -18,22 +18,20 @@ var y: (i32, i32) = x; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [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: %int_4.1: Core.IntLiteral = int_value 4 [template] // CHECK:STDOUT: %int_102.1: Core.IntLiteral = int_value 102 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, 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(%int_32) [template] -// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.9: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_4.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.5: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_4.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_102.1, %Convert.14 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_102.1, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_102.2: %i32 = int_value 102 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_4.2, %int_102.2) [template] @@ -42,7 +40,7 @@ var y: (i32, i32) = x; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .ImplicitAs = %import_ref.2 +// CHECK:STDOUT: .ImplicitAs = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -58,47 +56,31 @@ var y: (i32, i32) = x; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_9: init type = call constants.%Int(%int_32.loc11_9) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc11_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_14: init type = call constants.%Int(%int_32.loc11_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc11_9, %int.make_type_signed.loc11_14) -// CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %int.make_type_signed.loc11_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.3: type = converted %int.make_type_signed.loc11_9, %.loc11_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.4: type = value_of_initializer %int.make_type_signed.loc11_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.5: type = converted %int.make_type_signed.loc11_14, %.loc11_17.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.6: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc11_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%i32.loc11_9, %i32.loc11_14) +// CHECK:STDOUT: %.loc11_17.2: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %int_32.loc12_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc12_9: init type = call constants.%Int(%int_32.loc12_9) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc12_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc12_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc12_14: init type = call constants.%Int(%int_32.loc12_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc12_9, %int.make_type_signed.loc12_14) -// CHECK:STDOUT: %.loc12_17.2: type = value_of_initializer %int.make_type_signed.loc12_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_17.3: type = converted %int.make_type_signed.loc12_9, %.loc12_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_17.4: type = value_of_initializer %int.make_type_signed.loc12_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_17.5: type = converted %int.make_type_signed.loc12_14, %.loc12_17.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_17.6: type = converted %.loc12_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc12_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc12_17.1: %tuple.type.1 = tuple_literal (%i32.loc12_9, %i32.loc12_14) +// CHECK:STDOUT: %.loc12_17.2: type = converted %.loc12_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %int_32.loc14_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_9: init type = call constants.%Int(%int_32.loc14_9) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc14_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc14_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc14_14: init type = call constants.%Int(%int_32.loc14_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc14_9, %int.make_type_signed.loc14_14) -// CHECK:STDOUT: %.loc14_17.2: type = value_of_initializer %int.make_type_signed.loc14_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_17.3: type = converted %int.make_type_signed.loc14_9, %.loc14_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_17.4: type = value_of_initializer %int.make_type_signed.loc14_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_17.5: type = converted %int.make_type_signed.loc14_14, %.loc14_17.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_17.6: type = converted %.loc14_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc14_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14_17.1: %tuple.type.1 = tuple_literal (%i32.loc14_9, %i32.loc14_14) +// CHECK:STDOUT: %.loc14_17.2: type = converted %.loc14_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %x.var: ref %tuple.type.2 = var x // CHECK:STDOUT: %x: ref %tuple.type.2 = bind_name x, %x.var // CHECK:STDOUT: %int_32.loc15_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc15_9: init type = call constants.%Int(%int_32.loc15_9) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc15_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc15_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc15_14: init type = call constants.%Int(%int_32.loc15_14) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_17.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc15_9, %int.make_type_signed.loc15_14) -// CHECK:STDOUT: %.loc15_17.2: type = value_of_initializer %int.make_type_signed.loc15_9 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_17.3: type = converted %int.make_type_signed.loc15_9, %.loc15_17.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_17.4: type = value_of_initializer %int.make_type_signed.loc15_14 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_17.5: type = converted %int.make_type_signed.loc15_14, %.loc15_17.4 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_17.6: type = converted %.loc15_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %i32.loc15_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_17.1: %tuple.type.1 = tuple_literal (%i32.loc15_9, %i32.loc15_14) +// CHECK:STDOUT: %.loc15_17.2: type = converted %.loc15_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %y.var: ref %tuple.type.2 = var y // CHECK:STDOUT: %y: ref %tuple.type.2 = bind_name y, %y.var // CHECK:STDOUT: } @@ -108,13 +90,13 @@ var y: (i32, i32) = x; // CHECK:STDOUT: %int_4.loc11: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] // CHECK:STDOUT: %int_102.loc11: Core.IntLiteral = int_value 102 [template = constants.%int_102.1] // CHECK:STDOUT: %.loc11_28.1: %tuple.type.3 = tuple_literal (%int_4.loc11, %int_102.loc11) -// CHECK:STDOUT: %impl.elem0.loc11_28.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_28.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_28.1: = bound_method %int_4.loc11, %impl.elem0.loc11_28.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_28.1: = specific_function %Convert.bound.loc11_28.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_28.1: init %i32 = call %Convert.specific_fn.loc11_28.1(%int_4.loc11) [template = constants.%int_4.2] // CHECK:STDOUT: %.loc11_28.2: %i32 = value_of_initializer %int.convert_checked.loc11_28.1 [template = constants.%int_4.2] // CHECK:STDOUT: %.loc11_28.3: %i32 = converted %int_4.loc11, %.loc11_28.2 [template = constants.%int_4.2] -// CHECK:STDOUT: %impl.elem0.loc11_28.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc11_28.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc11_28.2: = bound_method %int_102.loc11, %impl.elem0.loc11_28.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_28.2: = specific_function %Convert.bound.loc11_28.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_28.2: init %i32 = call %Convert.specific_fn.loc11_28.2(%int_102.loc11) [template = constants.%int_102.2] @@ -128,14 +110,14 @@ var y: (i32, i32) = x; // CHECK:STDOUT: %int_4.loc14: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] // CHECK:STDOUT: %int_102.loc14: Core.IntLiteral = int_value 102 [template = constants.%int_102.1] // CHECK:STDOUT: %.loc14_28.1: %tuple.type.3 = tuple_literal (%int_4.loc14, %int_102.loc14) -// CHECK:STDOUT: %impl.elem0.loc14_28.1: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14_28.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_28.1: = bound_method %int_4.loc14, %impl.elem0.loc14_28.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc14_28.1: = specific_function %Convert.bound.loc14_28.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc14_28.1: init %i32 = call %Convert.specific_fn.loc14_28.1(%int_4.loc14) [template = constants.%int_4.2] // CHECK:STDOUT: %.loc14_28.2: init %i32 = converted %int_4.loc14, %int.convert_checked.loc14_28.1 [template = constants.%int_4.2] // CHECK:STDOUT: %tuple.elem0.loc14: ref %i32 = tuple_access file.%x.var, element0 // CHECK:STDOUT: %.loc14_28.3: init %i32 = initialize_from %.loc14_28.2 to %tuple.elem0.loc14 [template = constants.%int_4.2] -// CHECK:STDOUT: %impl.elem0.loc14_28.2: %Convert.type.2 = interface_witness_access constants.%interface.9, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %impl.elem0.loc14_28.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_28.2: = bound_method %int_102.loc14, %impl.elem0.loc14_28.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc14_28.2: = specific_function %Convert.bound.loc14_28.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc14_28.2: init %i32 = call %Convert.specific_fn.loc14_28.2(%int_102.loc14) [template = constants.%int_102.2] diff --git a/toolchain/check/testdata/where_expr/constraints.carbon b/toolchain/check/testdata/where_expr/constraints.carbon index da847fe51111..0fa5cd0d04c0 100644 --- a/toolchain/check/testdata/where_expr/constraints.carbon +++ b/toolchain/check/testdata/where_expr/constraints.carbon @@ -496,9 +496,7 @@ fn NotEmptyStruct() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %type_where: type = facet_type [template] // CHECK:STDOUT: %U: %type_where = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %U.patt: %type_where = symbolic_binding_pattern U, 0 [symbolic] @@ -508,7 +506,7 @@ fn NotEmptyStruct() { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -527,10 +525,8 @@ fn NotEmptyStruct() { // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic = constants.%.Self] // CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self [symbolic = constants.%.Self] // 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: %.loc8_51.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_51.2: type = converted %int.make_type_signed, %.loc8_51.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_33: type = where_expr %.Self [template = constants.%type_where] { +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc8: type = where_expr %.Self [template = constants.%type_where] { // CHECK:STDOUT: requirement_impls %.Self.ref, // CHECK:STDOUT: } // CHECK:STDOUT: %U.param: %type_where = value_param runtime_param @@ -557,7 +553,7 @@ fn NotEmptyStruct() { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %J.type: type = facet_type <@J> [template] -// CHECK:STDOUT: %interface.1: = interface_witness () [template] +// CHECK:STDOUT: %interface: = interface_witness () [template] // CHECK:STDOUT: %DoesNotImplI.type: type = fn_type @DoesNotImplI [template] // CHECK:STDOUT: %DoesNotImplI: %DoesNotImplI.type = struct_value () [template] // CHECK:STDOUT: %Impls.type: type = fn_type @Impls [template] @@ -604,7 +600,7 @@ fn NotEmptyStruct() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} -// CHECK:STDOUT: impl_decl @impl.1 [template] {} { +// CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %J.ref: type = name_ref J, imports.%import_ref.1 [template = constants.%J.type] // CHECK:STDOUT: } @@ -632,8 +628,8 @@ fn NotEmptyStruct() { // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: %C.ref as %J.ref { -// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface.1] +// CHECK:STDOUT: impl @impl: %C.ref as %J.ref { +// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %interface diff --git a/toolchain/check/testdata/where_expr/dot_self_index.carbon b/toolchain/check/testdata/where_expr/dot_self_index.carbon index def337b0be96..6d0df2b0a736 100644 --- a/toolchain/check/testdata/where_expr/dot_self_index.carbon +++ b/toolchain/check/testdata/where_expr/dot_self_index.carbon @@ -50,9 +50,7 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: %H: %H.type = struct_value () [template] // CHECK:STDOUT: %require_complete.2: = require_complete_type %Empty_where.type.1 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Empty.type.4: type = facet_type <@Empty, @Empty(%i32)> [template] // CHECK:STDOUT: %.Self.2: %Empty.type.4 = bind_symbolic_name .Self [symbolic] // CHECK:STDOUT: %assoc_type.3: type = assoc_entity_type %Empty.type.4, type [template] @@ -65,15 +63,15 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] -// CHECK:STDOUT: %complete_type.1: = complete_type_witness %Empty.type.4 [template] +// CHECK:STDOUT: %complete_type.2: = complete_type_witness %Empty.type.4 [template] // CHECK:STDOUT: %H.specific_fn: = specific_function %H, @H(%i32, bool) [template] -// CHECK:STDOUT: %complete_type.2: = complete_type_witness %Empty_where.type.2 [template] +// CHECK:STDOUT: %complete_type.3: = complete_type_witness %Empty_where.type.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .Bool = %import_ref.2 +// CHECK:STDOUT: .Bool = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -129,9 +127,7 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: } { // CHECK:STDOUT: %Empty.ref: %Empty.type.1 = name_ref Empty, file.%Empty.decl [template = constants.%Empty.generic] // CHECK:STDOUT: %int_32.loc20_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc20_15: init type = call constants.%Int(%int_32.loc20_15) [template = constants.%i32] -// CHECK:STDOUT: %.loc20_18.1: type = value_of_initializer %int.make_type_signed.loc20_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc20_18.2: type = converted %int.make_type_signed.loc20_15, %.loc20_18.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc20_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %Empty.type: type = facet_type <@Empty, @Empty(constants.%i32)> [template = constants.%Empty.type.4] // CHECK:STDOUT: %.Self: %Empty.type.4 = bind_symbolic_name .Self [symbolic = constants.%.Self.2] // CHECK:STDOUT: %.Self.ref: %Empty.type.4 = name_ref .Self, %.Self [symbolic = constants.%.Self.2] @@ -140,9 +136,7 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit.2] // CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0.2] // CHECK:STDOUT: %int_32.loc20_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc20_31: init type = call constants.%Int(%int_32.loc20_31) [template = constants.%i32] -// CHECK:STDOUT: %.loc20_34.1: type = value_of_initializer %int.make_type_signed.loc20_31 [template = constants.%i32] -// CHECK:STDOUT: %.loc20_34.2: type = converted %int.make_type_signed.loc20_31, %.loc20_34.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc20_31: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr.2] // CHECK:STDOUT: %.loc20_20: type = where_expr %.Self [template = constants.%Empty_where.type.2] { // CHECK:STDOUT: requirement_rewrite %impl.elem0, %ptr @@ -202,13 +196,11 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %H.ref: %H.type = name_ref H, file.%H.decl [template = constants.%H] // CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%int_32.loc21) [template = constants.%i32] +// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %U.ref: %Empty_where.type.2 = name_ref U, %U // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc21_17.1: type = value_of_initializer %int.make_type_signed.loc21 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_17.2: type = converted %int.make_type_signed.loc21, %.loc21_17.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc21_17.3: type = value_of_initializer %bool.make_type [template = bool] -// CHECK:STDOUT: %.loc21_17.4: type = converted %bool.make_type, %.loc21_17.3 [template = bool] +// CHECK:STDOUT: %.loc21_17.1: type = value_of_initializer %bool.make_type [template = bool] +// CHECK:STDOUT: %.loc21_17.2: type = converted %bool.make_type, %.loc21_17.1 [template = bool] // CHECK:STDOUT: %H.specific_fn: = specific_function %H.ref, @H(constants.%i32, bool) [template = constants.%H.specific_fn] // CHECK:STDOUT: %H.call: init %empty_tuple.type = call %H.specific_fn(%U.ref) // CHECK:STDOUT: return @@ -272,7 +264,7 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: %T.patt.loc18_6.2 => constants.%i32 // CHECK:STDOUT: %Empty.type.loc18_26.2 => constants.%Empty.type.4 // CHECK:STDOUT: %.Self.2 => constants.%.Self.2 -// CHECK:STDOUT: %require_complete.loc18_34 => constants.%complete_type.1 +// CHECK:STDOUT: %require_complete.loc18_34 => constants.%complete_type.2 // CHECK:STDOUT: %assoc_type => constants.%assoc_type.3 // CHECK:STDOUT: %assoc0 => constants.%assoc0.3 // CHECK:STDOUT: %.Self.as_wit.loc18_34.2 => constants.%.Self.as_wit.2 @@ -283,6 +275,6 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: %V.patt.loc18_43.2 => bool // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc18_17 => constants.%complete_type.2 +// CHECK:STDOUT: %require_complete.loc18_17 => constants.%complete_type.3 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/where_expr/equal_rewrite.carbon b/toolchain/check/testdata/where_expr/equal_rewrite.carbon index 6725d2a6c34c..ade492466595 100644 --- a/toolchain/check/testdata/where_expr/equal_rewrite.carbon +++ b/toolchain/check/testdata/where_expr/equal_rewrite.carbon @@ -404,9 +404,7 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self [symbolic] // CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %E_where.type: type = facet_type <@E where %impl.elem0 = %i32> [template] // CHECK:STDOUT: %G: %E_where.type = bind_symbolic_name G, 0 [symbolic] // CHECK:STDOUT: %G.patt: %E_where.type = symbolic_binding_pattern G, 0 [symbolic] @@ -427,7 +425,7 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -454,11 +452,9 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] // CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] // 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: %.loc8_32.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_32.2: type = converted %int.make_type_signed, %.loc8_32.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_21: type = where_expr %.Self [template = constants.%E_where.type] { -// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc8_32.2 +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc8: type = where_expr %.Self [template = constants.%E_where.type] { +// CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32 // CHECK:STDOUT: } // CHECK:STDOUT: %G.param: %E_where.type = value_param runtime_param // CHECK:STDOUT: %G.loc8_15.1: %E_where.type = bind_symbolic_name G, 0, %G.param [symbolic = %G.loc8_15.2 (constants.%G)] @@ -474,20 +470,16 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %.Self.as_wit.loc10_32: = facet_access_witness %.Self.ref.loc10_32 [symbolic = constants.%.Self.as_wit] // CHECK:STDOUT: %impl.elem0.loc10_32: type = interface_witness_access %.Self.as_wit.loc10_32, element0 [symbolic = constants.%impl.elem0] // CHECK:STDOUT: %int_32.loc10_37: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc10_37: init type = call constants.%Int(%int_32.loc10_37) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_37.1: type = value_of_initializer %int.make_type_signed.loc10_37 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_37.2: type = converted %int.make_type_signed.loc10_37, %.loc10_37.1 [template = constants.%i32] +// CHECK:STDOUT: %i32.loc10_37: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.Self.ref.loc10_45: %E.type = name_ref .Self, %.Self [symbolic = constants.%.Self] // CHECK:STDOUT: %F.ref.loc10_45: %assoc_type = name_ref F, @E.%assoc0 [template = constants.%assoc0] // CHECK:STDOUT: %.Self.as_wit.loc10_45: = facet_access_witness %.Self.ref.loc10_45 [symbolic = constants.%.Self.as_wit] // CHECK:STDOUT: %impl.elem0.loc10_45: type = interface_witness_access %.Self.as_wit.loc10_45, element0 [symbolic = constants.%impl.elem0] // CHECK:STDOUT: %int_32.loc10_50: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc10_50: init type = call constants.%Int(%int_32.loc10_50) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_50.1: type = value_of_initializer %int.make_type_signed.loc10_50 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_50.2: type = converted %int.make_type_signed.loc10_50, %.loc10_50.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_26: type = where_expr %.Self [template = constants.%E_where.type] { -// CHECK:STDOUT: requirement_rewrite %impl.elem0.loc10_32, %.loc10_37.2 -// CHECK:STDOUT: requirement_rewrite %impl.elem0.loc10_45, %.loc10_50.2 +// CHECK:STDOUT: %i32.loc10_50: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc10: type = where_expr %.Self [template = constants.%E_where.type] { +// CHECK:STDOUT: requirement_rewrite %impl.elem0.loc10_32, %i32.loc10_37 +// CHECK:STDOUT: requirement_rewrite %impl.elem0.loc10_45, %i32.loc10_50 // CHECK:STDOUT: } // CHECK:STDOUT: %H.param: %E_where.type = value_param runtime_param // CHECK:STDOUT: %H.loc10_20.1: %E_where.type = bind_symbolic_name H, 0, %H.param [symbolic = %H.loc10_20.2 (constants.%H)] @@ -503,11 +495,9 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] // CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] // 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: %.loc14_37.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc14_37.2: type = converted %int.make_type_signed, %.loc14_37.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_26: type = where_expr %.Self [template = constants.%E_where.type] { -// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc14_37.2 +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc14: type = where_expr %.Self [template = constants.%E_where.type] { +// CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32 // CHECK:STDOUT: } // CHECK:STDOUT: %I.param: %E_where.type = value_param runtime_param // CHECK:STDOUT: %I.loc14_20.1: %E_where.type = bind_symbolic_name I, 0, %I.param [symbolic = %I.loc14_20.2 (constants.%I)] @@ -790,9 +780,7 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self [symbolic] // CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %O_where.type.1: type = facet_type <@O where %impl.elem0 = %i32> [template] // CHECK:STDOUT: %Q: %O_where.type.1 = bind_symbolic_name Q, 0 [symbolic] // CHECK:STDOUT: %Q.patt: %O_where.type.1 = symbolic_binding_pattern Q, 0 [symbolic] @@ -810,8 +798,8 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .Bool = %import_ref.2 -// CHECK:STDOUT: .ImplicitAs = %import_ref.3 +// CHECK:STDOUT: .Bool = %import_ref.5 +// CHECK:STDOUT: .ImplicitAs = %import_ref.6 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -837,11 +825,9 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] // CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] // 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: %.loc8_33.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_33.2: type = converted %int.make_type_signed, %.loc8_33.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_22: type = where_expr %.Self [template = constants.%O_where.type.1] { -// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc8_33.2 +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc8: type = where_expr %.Self [template = constants.%O_where.type.1] { +// CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32 // CHECK:STDOUT: } // CHECK:STDOUT: %Q.param: %O_where.type.1 = value_param runtime_param // CHECK:STDOUT: %Q.loc8_16.1: %O_where.type.1 = bind_symbolic_name Q, 0, %Q.param [symbolic = %Q.loc8_16.2 (constants.%Q)] @@ -1078,9 +1064,7 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %D: %A_where.type.2 = bind_symbolic_name D, 0 [symbolic] // CHECK:STDOUT: %D.patt: %A_where.type.2 = symbolic_binding_pattern D, 0 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1091,18 +1075,18 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Bool = %import_ref.8 // CHECK:STDOUT: .ImplicitAs = %import_ref.9 -// CHECK:STDOUT: .Int = %import_ref.50 +// CHECK:STDOUT: .Int = %import_ref.20 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5 = import_ref Main//equal_constraint, inst17 [no loc], unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//equal_constraint, loc5_15, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Main//equal_constraint, P, unloaded -// CHECK:STDOUT: %import_ref.45 = import_ref Main//nested_rewrites, inst17 [no loc], unloaded -// CHECK:STDOUT: %import_ref.46 = import_ref Main//nested_rewrites, loc5_15, unloaded -// CHECK:STDOUT: %import_ref.47 = import_ref Main//nested_rewrites, loc6_15, unloaded -// CHECK:STDOUT: %import_ref.48 = import_ref Main//nested_rewrites, B, unloaded -// CHECK:STDOUT: %import_ref.49 = import_ref Main//nested_rewrites, C, unloaded +// CHECK:STDOUT: %import_ref.15 = import_ref Main//nested_rewrites, inst17 [no loc], unloaded +// CHECK:STDOUT: %import_ref.16 = import_ref Main//nested_rewrites, loc5_15, unloaded +// CHECK:STDOUT: %import_ref.17 = import_ref Main//nested_rewrites, loc6_15, unloaded +// CHECK:STDOUT: %import_ref.18 = import_ref Main//nested_rewrites, B, unloaded +// CHECK:STDOUT: %import_ref.19 = import_ref Main//nested_rewrites, C, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1128,10 +1112,10 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: // CHECK:STDOUT: interface @A [from "nested_rewrites.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.45 -// CHECK:STDOUT: .B = imports.%import_ref.46 -// CHECK:STDOUT: .C = imports.%import_ref.47 -// CHECK:STDOUT: witness = (imports.%import_ref.48, imports.%import_ref.49) +// CHECK:STDOUT: .Self = imports.%import_ref.15 +// CHECK:STDOUT: .B = imports.%import_ref.16 +// CHECK:STDOUT: .C = imports.%import_ref.17 +// CHECK:STDOUT: witness = (imports.%import_ref.18, imports.%import_ref.19) // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Calls() { @@ -1141,8 +1125,8 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %.loc19: %N_where.type = converted %bool.make_type, [template = ] // CHECK:STDOUT: %NestedRewrite.ref: %NestedRewrite.type = name_ref NestedRewrite, imports.%import_ref.4 [template = constants.%NestedRewrite] // 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: %.loc32: %A_where.type.2 = converted %int.make_type_signed, [template = ] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc32: %A_where.type.2 = converted %i32, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1251,7 +1235,7 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] -// CHECK:STDOUT: %interface.1: = interface_witness () [template] +// CHECK:STDOUT: %interface: = interface_witness () [template] // CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic] // CHECK:STDOUT: %type_where: type = facet_type [template] // CHECK:STDOUT: } @@ -1274,7 +1258,7 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %A.decl: type = interface_decl @A [template = constants.%A.type] {} {} // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} {} -// CHECK:STDOUT: impl_decl @impl.1 [template] {} { +// CHECK:STDOUT: impl_decl @impl [template] {} { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A.type] // CHECK:STDOUT: } @@ -1294,8 +1278,8 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: %D.ref as %A.ref { -// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface.1] +// CHECK:STDOUT: impl @impl: %D.ref as %A.ref { +// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %interface @@ -1342,9 +1326,7 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %.Self.as_wit.2: = facet_access_witness %.Self.2 [symbolic] // CHECK:STDOUT: %impl.elem1.2: type = interface_witness_access %.Self.as_wit.2, element1 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %E_where.type.3: type = facet_type <@E where %impl.elem1.2 = %i32 and %impl.elem0 = %empty_struct_type> [template] // CHECK:STDOUT: %E_where.type.4: type = facet_type <@E where %impl.elem0 = %impl.elem1.1> [template] // CHECK:STDOUT: } @@ -1354,7 +1336,7 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: .Bool = %import_ref.1 // CHECK:STDOUT: .Float = %import_ref.2 // CHECK:STDOUT: .ImplicitAs = %import_ref.3 -// CHECK:STDOUT: .Int = %import_ref.39 +// CHECK:STDOUT: .Int = %import_ref.9 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -1406,11 +1388,9 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %.Self.as_wit.loc27_33: = facet_access_witness %.Self.ref.loc27_33 [symbolic = constants.%.Self.as_wit.2] // CHECK:STDOUT: %impl.elem1.loc27: type = interface_witness_access %.Self.as_wit.loc27_33, element1 [symbolic = constants.%impl.elem1.2] // 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: %.loc27_38.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc27_38.2: type = converted %int.make_type_signed, %.loc27_38.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc27_27: type = where_expr %.Self.3 [template = constants.%E_where.type.3] { -// CHECK:STDOUT: requirement_rewrite %impl.elem1.loc27, %.loc27_38.2 +// CHECK:STDOUT: requirement_rewrite %impl.elem1.loc27, %i32 // CHECK:STDOUT: } // CHECK:STDOUT: %E.ref.loc35: type = name_ref E, %E.decl [template = constants.%E.type] // CHECK:STDOUT: %.Self.4: %E.type = bind_symbolic_name .Self [symbolic = constants.%.Self.1] diff --git a/toolchain/check/testdata/where_expr/fail_not_facet.carbon b/toolchain/check/testdata/where_expr/fail_not_facet.carbon index 559a46b79a3f..d9ea24d531b0 100644 --- a/toolchain/check/testdata/where_expr/fail_not_facet.carbon +++ b/toolchain/check/testdata/where_expr/fail_not_facet.carbon @@ -41,9 +41,7 @@ var v: e where .x = 3; // CHECK:STDOUT: // CHECK:STDOUT: constants { // 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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %T.patt: = symbolic_binding_pattern T, 0 [symbolic] @@ -54,7 +52,7 @@ var v: e where .x = 3; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 -// CHECK:STDOUT: .Bool = %import_ref.2 +// CHECK:STDOUT: .Bool = %import_ref.5 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -71,13 +69,11 @@ var v: e where .x = 3; // CHECK:STDOUT: %T.param_patt: = value_param_pattern %T.patt.loc8_6.1, runtime_param [symbolic = %T.patt.loc8_6.2 (constants.%T.patt)] // CHECK:STDOUT: } { // 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: %.loc8_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_10.2: type = converted %int.make_type_signed, %.loc8_10.1 [template = constants.%i32] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.Self: = bind_symbolic_name .Self [template = ] // CHECK:STDOUT: %.Self.ref: = name_ref .Self, %.Self [template = ] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc8_14: type = where_expr %.Self [template = ] { +// CHECK:STDOUT: %.loc8: type = where_expr %.Self [template = ] { // CHECK:STDOUT: requirement_equivalent %.Self.ref, %bool.make_type // CHECK:STDOUT: } // CHECK:STDOUT: %T.param: = value_param runtime_param diff --git a/toolchain/check/testdata/where_expr/non_generic.carbon b/toolchain/check/testdata/where_expr/non_generic.carbon index a6ac250b226d..b60be9a0466f 100644 --- a/toolchain/check/testdata/where_expr/non_generic.carbon +++ b/toolchain/check/testdata/where_expr/non_generic.carbon @@ -24,9 +24,7 @@ fn NotGenericF(U: I where .T == i32) {} // CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self [symbolic] // CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [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, %int_32 [template] +// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where TODO> [template] // CHECK:STDOUT: %NotGenericF.type: type = fn_type @NotGenericF [template] // CHECK:STDOUT: %NotGenericF: %NotGenericF.type = struct_value () [template] @@ -34,7 +32,7 @@ fn NotGenericF(U: I where .T == i32) {} // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -59,9 +57,9 @@ fn NotGenericF(U: I where .T == i32) {} // CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] // CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] // 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: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc14: type = where_expr %.Self [template = constants.%I_where.type] { -// CHECK:STDOUT: requirement_equivalent %impl.elem0, %int.make_type_signed +// CHECK:STDOUT: requirement_equivalent %impl.elem0, %i32 // CHECK:STDOUT: } // CHECK:STDOUT: %U.param: %I_where.type = value_param runtime_param0 // CHECK:STDOUT: %U: %I_where.type = bind_name U, %U.param diff --git a/toolchain/diagnostics/diagnostic_emitter.h b/toolchain/diagnostics/diagnostic_emitter.h index 761a9e68f2b6..8c5342e38758 100644 --- a/toolchain/diagnostics/diagnostic_emitter.h +++ b/toolchain/diagnostics/diagnostic_emitter.h @@ -79,7 +79,7 @@ class DiagnosticEmitter { if (!emitter_) { return; } - for (auto annotate_fn : emitter_->annotate_fns_) { + for (auto annotate_fn : llvm::reverse(emitter_->annotate_fns_)) { annotate_fn(*this); } emitter_->consumer_->HandleDiagnostic(std::move(diagnostic_)); diff --git a/toolchain/lower/testdata/array/field.carbon b/toolchain/lower/testdata/array/field.carbon index 38d0b61979a5..0f14bb476d0a 100644 --- a/toolchain/lower/testdata/array/field.carbon +++ b/toolchain/lower/testdata/array/field.carbon @@ -42,20 +42,20 @@ class A { // CHECK:STDOUT: define i32 @_CAccess.A.Main(ptr %self) !dbg !10 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc19_16.1.v = getelementptr inbounds nuw { [2 x i32] }, ptr %self, i32 0, i32 0, !dbg !11 -// CHECK:STDOUT: %.loc19_20.4.array.index = getelementptr inbounds [2 x i32], ptr %.loc19_16.1.v, i32 0, i32 0, !dbg !11 -// CHECK:STDOUT: %.loc19_20.5 = load i32, ptr %.loc19_20.4.array.index, align 4, !dbg !11 -// CHECK:STDOUT: ret i32 %.loc19_20.5, !dbg !12 +// CHECK:STDOUT: %.loc19_20.2.array.index = getelementptr inbounds [2 x i32], ptr %.loc19_16.1.v, i32 0, i32 0, !dbg !11 +// CHECK:STDOUT: %.loc19_20.3 = load i32, ptr %.loc19_20.2.array.index, align 4, !dbg !11 +// CHECK:STDOUT: ret i32 %.loc19_20.3, !dbg !12 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CUse.A.Main(ptr %self) !dbg !13 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc23_9.2.v = getelementptr inbounds nuw { [2 x i32] }, ptr %self, i32 0, i32 0, !dbg !14 -// CHECK:STDOUT: %.loc23_14.3.array.index = getelementptr inbounds [2 x i32], ptr %.loc23_9.2.v, i32 0, i32 0, !dbg !14 -// CHECK:STDOUT: store i32 1, ptr %.loc23_14.3.array.index, align 4, !dbg !14 +// CHECK:STDOUT: %.loc23_14.array.index = getelementptr inbounds [2 x i32], ptr %.loc23_9.2.v, i32 0, i32 0, !dbg !14 +// CHECK:STDOUT: store i32 1, ptr %.loc23_14.array.index, align 4, !dbg !14 // CHECK:STDOUT: %.loc24_16.2.v = getelementptr inbounds nuw { [2 x i32] }, ptr %self, i32 0, i32 0, !dbg !15 -// CHECK:STDOUT: %.loc24_21.3.array.index = getelementptr inbounds [2 x i32], ptr %.loc24_16.2.v, i32 0, i32 1, !dbg !15 -// CHECK:STDOUT: %.loc24_21.4 = load i32, ptr %.loc24_21.3.array.index, align 4, !dbg !15 -// CHECK:STDOUT: ret i32 %.loc24_21.4, !dbg !16 +// CHECK:STDOUT: %.loc24_21.1.array.index = getelementptr inbounds [2 x i32], ptr %.loc24_16.2.v, i32 0, i32 1, !dbg !15 +// CHECK:STDOUT: %.loc24_21.2 = load i32, ptr %.loc24_21.1.array.index, align 4, !dbg !15 +// CHECK:STDOUT: ret i32 %.loc24_21.2, !dbg !16 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite) diff --git a/toolchain/lower/testdata/array/function_param.carbon b/toolchain/lower/testdata/array/function_param.carbon index 4b48d31463c9..01f4c72ffe7b 100644 --- a/toolchain/lower/testdata/array/function_param.carbon +++ b/toolchain/lower/testdata/array/function_param.carbon @@ -23,9 +23,9 @@ fn G() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CF.Main(ptr %arr, i32 %i) !dbg !4 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc12_15.4.array.index = getelementptr inbounds [3 x i32], ptr %arr, i32 0, i32 %i, !dbg !7 -// CHECK:STDOUT: %.loc12_15.5 = load i32, ptr %.loc12_15.4.array.index, align 4, !dbg !7 -// CHECK:STDOUT: ret i32 %.loc12_15.5, !dbg !8 +// CHECK:STDOUT: %.loc12_15.2.array.index = getelementptr inbounds [3 x i32], ptr %arr, i32 0, i32 %i, !dbg !7 +// CHECK:STDOUT: %.loc12_15.3 = load i32, ptr %.loc12_15.2.array.index, align 4, !dbg !7 +// CHECK:STDOUT: ret i32 %.loc12_15.3, !dbg !8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CG.Main() !dbg !9 { diff --git a/toolchain/lower/testdata/function/generic/call.carbon b/toolchain/lower/testdata/function/generic/call.carbon index e8fbe35e4261..cd9db70a609d 100644 --- a/toolchain/lower/testdata/function/generic/call.carbon +++ b/toolchain/lower/testdata/function/generic/call.carbon @@ -41,24 +41,24 @@ fn G() { // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %d.var, ptr align 1 @D.val.loc19_16, i64 0, i1 false), !dbg !10 // CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !11 // CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !12 -// CHECK:STDOUT: call void @_CF.Main.46(ptr %c.var), !dbg !13 -// CHECK:STDOUT: call void @_CF.Main.47(ptr %d.var), !dbg !14 +// CHECK:STDOUT: call void @_CF.Main.40(ptr %c.var), !dbg !13 +// CHECK:STDOUT: call void @_CF.Main.41(ptr %d.var), !dbg !14 // CHECK:STDOUT: %.loc24 = load i32, ptr %n.var, align 4, !dbg !15 -// CHECK:STDOUT: call void @_CF.Main.48(i32 %.loc24), !dbg !16 -// CHECK:STDOUT: call void @_CF.Main.49(%type zeroinitializer), !dbg !17 +// CHECK:STDOUT: call void @_CF.Main.42(i32 %.loc24), !dbg !16 +// CHECK:STDOUT: call void @_CF.Main.43(%type zeroinitializer), !dbg !17 // CHECK:STDOUT: ret void, !dbg !18 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #0 // CHECK:STDOUT: -// CHECK:STDOUT: declare void @_CF.Main.46(ptr) +// CHECK:STDOUT: declare void @_CF.Main.40(ptr) // CHECK:STDOUT: -// CHECK:STDOUT: declare void @_CF.Main.47(ptr) +// CHECK:STDOUT: declare void @_CF.Main.41(ptr) // CHECK:STDOUT: -// CHECK:STDOUT: declare void @_CF.Main.48(i32) +// CHECK:STDOUT: declare void @_CF.Main.42(i32) // CHECK:STDOUT: -// CHECK:STDOUT: declare void @_CF.Main.49(%type) +// CHECK:STDOUT: declare void @_CF.Main.43(%type) // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.memcpy.p0.p0.i64, { 1, 0 } diff --git a/toolchain/lower/testdata/function/generic/call_method.carbon b/toolchain/lower/testdata/function/generic/call_method.carbon index 5bd2c70938ec..74fd79f9ef03 100644 --- a/toolchain/lower/testdata/function/generic/call_method.carbon +++ b/toolchain/lower/testdata/function/generic/call_method.carbon @@ -32,14 +32,14 @@ fn CallF() -> i32 { // CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !9 // CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !10 // CHECK:STDOUT: %.loc20_14 = load i32, ptr %n.var, align 4, !dbg !11 -// CHECK:STDOUT: %F.call = call i32 @_CF.C.Main.46(ptr %c.var, i32 %.loc20_14), !dbg !12 +// CHECK:STDOUT: %F.call = call i32 @_CF.C.Main.40(ptr %c.var, i32 %.loc20_14), !dbg !12 // CHECK:STDOUT: ret i32 %F.call, !dbg !13 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #0 // CHECK:STDOUT: -// CHECK:STDOUT: declare i32 @_CF.C.Main.46(ptr, i32) +// CHECK:STDOUT: declare i32 @_CF.C.Main.40(ptr, i32) // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/index/array_element_access.carbon b/toolchain/lower/testdata/index/array_element_access.carbon index 3ea9f3996256..e1c7ae7c38c4 100644 --- a/toolchain/lower/testdata/index/array_element_access.carbon +++ b/toolchain/lower/testdata/index/array_element_access.carbon @@ -57,15 +57,15 @@ fn Run() { // CHECK:STDOUT: store i32 1, ptr %b.var, align 4, !dbg !16 // CHECK:STDOUT: %c.var = alloca i32, align 4, !dbg !17 // CHECK:STDOUT: %.loc17_18 = load i32, ptr %b.var, align 4, !dbg !18 -// CHECK:STDOUT: %.loc17_19.3.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, i32 %.loc17_18, !dbg !19 -// CHECK:STDOUT: %.loc17_19.4 = load i32, ptr %.loc17_19.3.array.index, align 4, !dbg !19 -// CHECK:STDOUT: store i32 %.loc17_19.4, ptr %c.var, align 4, !dbg !20 +// CHECK:STDOUT: %.loc17_19.1.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, i32 %.loc17_18, !dbg !19 +// CHECK:STDOUT: %.loc17_19.2 = load i32, ptr %.loc17_19.1.array.index, align 4, !dbg !19 +// CHECK:STDOUT: store i32 %.loc17_19.2, ptr %c.var, align 4, !dbg !20 // CHECK:STDOUT: %d.var = alloca i32, align 4, !dbg !21 // CHECK:STDOUT: %.loc18_18.1.temp = alloca [2 x i32], align 4, !dbg !22 // CHECK:STDOUT: call void @_CB.Main(ptr %.loc18_18.1.temp), !dbg !22 -// CHECK:STDOUT: %.loc18_21.3.array.index = getelementptr inbounds [2 x i32], ptr %.loc18_18.1.temp, i32 0, i32 1, !dbg !22 -// CHECK:STDOUT: %.loc18_21.4 = load i32, ptr %.loc18_21.3.array.index, align 4, !dbg !22 -// CHECK:STDOUT: store i32 %.loc18_21.4, ptr %d.var, align 4, !dbg !23 +// CHECK:STDOUT: %.loc18_21.1.array.index = getelementptr inbounds [2 x i32], ptr %.loc18_18.1.temp, i32 0, i32 1, !dbg !22 +// CHECK:STDOUT: %.loc18_21.2 = load i32, ptr %.loc18_21.1.array.index, align 4, !dbg !22 +// CHECK:STDOUT: store i32 %.loc18_21.2, ptr %d.var, align 4, !dbg !23 // CHECK:STDOUT: ret void, !dbg !24 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/struct/member_access.carbon b/toolchain/lower/testdata/struct/member_access.carbon index 3c8d39525327..4a476f38ee8b 100644 --- a/toolchain/lower/testdata/struct/member_access.carbon +++ b/toolchain/lower/testdata/struct/member_access.carbon @@ -31,8 +31,8 @@ fn Run() -> i32 { // CHECK:STDOUT: %.loc13_17.2 = load i32, ptr %.loc13_17.1.b, align 4, !dbg !11 // CHECK:STDOUT: store i32 %.loc13_17.2, ptr %y.var, align 4, !dbg !12 // CHECK:STDOUT: %z.var = alloca i32, align 4, !dbg !13 -// CHECK:STDOUT: %.loc14_16 = load i32, ptr %y.var, align 4, !dbg !14 -// CHECK:STDOUT: store i32 %.loc14_16, ptr %z.var, align 4, !dbg !15 +// CHECK:STDOUT: %.loc14 = load i32, ptr %y.var, align 4, !dbg !14 +// CHECK:STDOUT: store i32 %.loc14, ptr %z.var, align 4, !dbg !15 // CHECK:STDOUT: ret i32 0, !dbg !16 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/tuple/access/element_access.carbon b/toolchain/lower/testdata/tuple/access/element_access.carbon index 14d1f0522657..e8258eab2f31 100644 --- a/toolchain/lower/testdata/tuple/access/element_access.carbon +++ b/toolchain/lower/testdata/tuple/access/element_access.carbon @@ -29,12 +29,12 @@ fn Run() -> i32 { // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %a.var, ptr align 4 @tuple.loc12_37, i64 12, i1 false), !dbg !9 // CHECK:STDOUT: %b.var = alloca i32, align 4, !dbg !10 // CHECK:STDOUT: %tuple.elem0.loc13.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !11 -// CHECK:STDOUT: %.loc13_17 = load i32, ptr %tuple.elem0.loc13.tuple.elem, align 4, !dbg !11 -// CHECK:STDOUT: store i32 %.loc13_17, ptr %b.var, align 4, !dbg !12 +// CHECK:STDOUT: %.loc13 = load i32, ptr %tuple.elem0.loc13.tuple.elem, align 4, !dbg !11 +// CHECK:STDOUT: store i32 %.loc13, ptr %b.var, align 4, !dbg !12 // CHECK:STDOUT: %c.var = alloca i32, align 4, !dbg !13 // CHECK:STDOUT: %tuple.elem2.loc14.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 2, !dbg !14 -// CHECK:STDOUT: %.loc14_17 = load i32, ptr %tuple.elem2.loc14.tuple.elem, align 4, !dbg !14 -// CHECK:STDOUT: store i32 %.loc14_17, ptr %c.var, align 4, !dbg !15 +// CHECK:STDOUT: %.loc14 = load i32, ptr %tuple.elem2.loc14.tuple.elem, align 4, !dbg !14 +// CHECK:STDOUT: store i32 %.loc14, ptr %c.var, align 4, !dbg !15 // CHECK:STDOUT: ret i32 0, !dbg !16 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/sem_ir/file.cpp b/toolchain/sem_ir/file.cpp index 336938417e82..3a750eace4a0 100644 --- a/toolchain/sem_ir/file.cpp +++ b/toolchain/sem_ir/file.cpp @@ -32,7 +32,6 @@ File::File(const Parse::Tree* parse_tree, CheckIRId check_ir_id, filename_(std::move(filename)), impls_(*this), type_blocks_(allocator_), - name_scopes_(&insts_), constant_values_(ConstantId::NotConstant), inst_blocks_(allocator_), constants_(this) { diff --git a/toolchain/sem_ir/file.h b/toolchain/sem_ir/file.h index c624a705e8e6..9aaf1b163bb9 100644 --- a/toolchain/sem_ir/file.h +++ b/toolchain/sem_ir/file.h @@ -248,7 +248,7 @@ class File : public Printable { InstStore insts_; // Storage for name scopes. - NameScopeStore name_scopes_; + NameScopeStore name_scopes_ = NameScopeStore(this); // Constant values for instructions. ConstantValueStore constant_values_; diff --git a/toolchain/sem_ir/inst_namer.cpp b/toolchain/sem_ir/inst_namer.cpp index 454da12adfb9..a33e2b57add1 100644 --- a/toolchain/sem_ir/inst_namer.cpp +++ b/toolchain/sem_ir/inst_namer.cpp @@ -13,6 +13,7 @@ #include "toolchain/sem_ir/function.h" #include "toolchain/sem_ir/ids.h" #include "toolchain/sem_ir/inst_kind.h" +#include "toolchain/sem_ir/type_info.h" #include "toolchain/sem_ir/typed_insts.h" namespace Carbon::SemIR { @@ -388,7 +389,8 @@ auto InstNamer::CollectNamesInBlock(ScopeId scope_id, (sem_ir_->names().GetIRBaseName(name_id).str() + suffix).str()); }; auto add_int_or_float_type_name = [&](char type_literal_prefix, - SemIR::InstId bit_width_id) { + SemIR::InstId bit_width_id, + llvm::StringRef suffix = "") { std::string name; llvm::raw_string_ostream out(name); out << type_literal_prefix; @@ -397,6 +399,7 @@ auto InstNamer::CollectNamesInBlock(ScopeId scope_id, } else { out << "N"; } + out << suffix; add_inst_name(std::move(name)); }; auto facet_access_name_id = [&](InstId facet_value_inst_id) -> NameId { @@ -510,6 +513,11 @@ auto InstNamer::CollectNamesInBlock(ScopeId scope_id, continue; } case CARBON_KIND(ClassType inst): { + if (auto literal_info = NumericTypeLiteralInfo::ForType(*sem_ir_, inst); + literal_info.is_valid()) { + add_inst_name(literal_info.GetLiteralAsString(*sem_ir_)); + break; + } add_inst_name_id(sem_ir_->classes().Get(inst.class_id).name_id); continue; } @@ -658,7 +666,7 @@ auto InstNamer::CollectNamesInBlock(ScopeId scope_id, } case CARBON_KIND(IntType inst): { add_int_or_float_type_name(inst.int_kind == IntKind::Signed ? 'i' : 'u', - inst.bit_width_id); + inst.bit_width_id, ".builtin"); continue; } case CARBON_KIND(IntValue inst): { diff --git a/toolchain/sem_ir/name_scope.cpp b/toolchain/sem_ir/name_scope.cpp index d87e9d2e9662..bd064afc9fcb 100644 --- a/toolchain/sem_ir/name_scope.cpp +++ b/toolchain/sem_ir/name_scope.cpp @@ -4,6 +4,8 @@ #include "toolchain/sem_ir/name_scope.h" +#include "toolchain/sem_ir/file.h" + namespace Carbon::SemIR { auto NameScope::Print(llvm::raw_ostream& out) const -> void { @@ -51,4 +53,25 @@ auto NameScope::LookupOrAdd(SemIR::NameId name_id, InstId inst_id, return {true, EntryId(names_.size() - 1)}; } +auto NameScopeStore::GetInstIfValid(NameScopeId scope_id) const + -> std::pair> { + if (!scope_id.is_valid()) { + return {InstId::Invalid, std::nullopt}; + } + auto inst_id = Get(scope_id).inst_id(); + if (!inst_id.is_valid()) { + return {InstId::Invalid, std::nullopt}; + } + return {inst_id, file_->insts().Get(inst_id)}; +} + +auto NameScopeStore::IsCorePackage(NameScopeId scope_id) const -> bool { + if (!IsPackage(scope_id)) { + return false; + } + auto scope_name = + file_->names().GetAsStringIfIdentifier(Get(scope_id).name_id()); + return scope_name == "Core"; +} + } // namespace Carbon::SemIR diff --git a/toolchain/sem_ir/name_scope.h b/toolchain/sem_ir/name_scope.h index e7b38278220b..c9fa8b1f5208 100644 --- a/toolchain/sem_ir/name_scope.h +++ b/toolchain/sem_ir/name_scope.h @@ -163,7 +163,7 @@ class NameScope : public Printable { // Provides a ValueStore wrapper for an API specific to name scopes. class NameScopeStore { public: - explicit NameScopeStore(InstStore* insts) : insts_(insts) {} + explicit NameScopeStore(const File* file) : file_(file) {} // Adds a name scope, returning an ID to reference it. auto Add(InstId inst_id, NameId name_id, NameScopeId parent_scope_id) @@ -191,17 +191,21 @@ class NameScopeStore { // Returns the instruction owning the requested name scope, or Invalid with // nullopt if the scope is either invalid or has no associated instruction. auto GetInstIfValid(NameScopeId scope_id) const - -> std::pair> { + -> std::pair>; + + // Returns whether the provided scope ID is for a package scope. + auto IsPackage(NameScopeId scope_id) const -> bool { if (!scope_id.is_valid()) { - return {InstId::Invalid, std::nullopt}; + return false; } - auto inst_id = Get(scope_id).inst_id(); - if (!inst_id.is_valid()) { - return {InstId::Invalid, std::nullopt}; - } - return {inst_id, insts_->Get(inst_id)}; + // A package is either the current package or an imported package. + return scope_id == SemIR::NameScopeId::Package || + Get(scope_id).is_imported_package(); } + // Returns whether the provided scope ID is for the Core package. + auto IsCorePackage(NameScopeId scope_id) const -> bool; + auto OutputYaml() const -> Yaml::OutputMapping { return values_.OutputYaml(); } @@ -213,7 +217,7 @@ class NameScopeStore { } private: - InstStore* insts_; + const File* file_; ValueStore values_; }; diff --git a/toolchain/sem_ir/stringify_type.cpp b/toolchain/sem_ir/stringify_type.cpp index 659ee92a968e..392080b74ae3 100644 --- a/toolchain/sem_ir/stringify_type.cpp +++ b/toolchain/sem_ir/stringify_type.cpp @@ -7,6 +7,7 @@ #include "toolchain/base/kind_switch.h" #include "toolchain/sem_ir/entity_with_params_base.h" #include "toolchain/sem_ir/ids.h" +#include "toolchain/sem_ir/type_info.h" namespace Carbon::SemIR { @@ -203,6 +204,11 @@ auto StringifyTypeExpr(const SemIR::File& sem_ir, InstId outer_inst_id) } case CARBON_KIND(ClassType inst): { const auto& class_info = sem_ir.classes().Get(inst.class_id); + if (auto literal_info = NumericTypeLiteralInfo::ForType(sem_ir, inst); + literal_info.is_valid()) { + literal_info.PrintLiteral(sem_ir, out); + break; + } step_stack.PushEntityName(class_info, inst.specific_id); break; } @@ -321,12 +327,14 @@ auto StringifyTypeExpr(const SemIR::File& sem_ir, InstId outer_inst_id) break; } case CARBON_KIND(IntType inst): { + out << ""); if (auto width_value = sem_ir.insts().TryGetAs(inst.bit_width_id)) { out << (inst.int_kind.is_signed() ? "i" : "u"); sem_ir.ints().Get(width_value->int_id).print(out, /*isSigned=*/false); } else { - out << (inst.int_kind.is_signed() ? "Core.Int(" : "Core.UInt("); + out << (inst.int_kind.is_signed() ? "Int(" : "UInt("); step_stack.PushString(")"); step_stack.PushInstId(inst.bit_width_id); } diff --git a/toolchain/sem_ir/type_info.cpp b/toolchain/sem_ir/type_info.cpp index 5a2f9b933a5c..6143fc687947 100644 --- a/toolchain/sem_ir/type_info.cpp +++ b/toolchain/sem_ir/type_info.cpp @@ -67,4 +67,64 @@ auto InitRepr::ForType(const File& file, TypeId type_id) -> InitRepr { } } +auto NumericTypeLiteralInfo::ForType(const File& file, ClassType class_type) + -> NumericTypeLiteralInfo { + // Quickly rule out any class that's not a specific. + if (!class_type.specific_id.is_valid()) { + return NumericTypeLiteralInfo::Invalid; + } + + // The class must be declared in the `Core` package. + const auto& class_info = file.classes().Get(class_type.class_id); + if (!class_info.scope_id.is_valid() || + !file.name_scopes().IsCorePackage( + file.name_scopes().Get(class_info.scope_id).parent_scope_id())) { + return NumericTypeLiteralInfo::Invalid; + } + + // The class's name must be the name corresponding to a type literal. + auto name_ident = file.names().GetAsStringIfIdentifier(class_info.name_id); + if (!name_ident) { + return NumericTypeLiteralInfo::Invalid; + } + Kind kind = llvm::StringSwitch(*name_ident) + .Case("Int", Int) + .Case("UInt", UInt) + .Case("Float", Float) + .Default(None); + if (kind == None) { + return NumericTypeLiteralInfo::Invalid; + } + + // There must be exactly one argument. + const auto& specific = file.specifics().Get(class_type.specific_id); + auto args = file.inst_blocks().Get(specific.args_id); + if (args.size() != 1) { + return NumericTypeLiteralInfo::Invalid; + } + + // And the argument must be an integer value. + auto width_arg = file.insts().TryGetAs(args[0]); + if (!width_arg) { + return NumericTypeLiteralInfo::Invalid; + } + return {.kind = kind, .bit_width_id = width_arg->int_id}; +} + +auto NumericTypeLiteralInfo::PrintLiteral(const File& file, + llvm::raw_ostream& out) const + -> void { + CARBON_CHECK(is_valid()); + out << static_cast(kind); + file.ints().Get(bit_width_id).print(out, /*isSigned=*/false); +} + +auto NumericTypeLiteralInfo::GetLiteralAsString(const File& file) const + -> std::string { + std::string result; + llvm::raw_string_ostream out(result); + PrintLiteral(file, out); + return result; +} + } // namespace Carbon::SemIR diff --git a/toolchain/sem_ir/type_info.h b/toolchain/sem_ir/type_info.h index e184ad177d2b..d957bd5d9176 100644 --- a/toolchain/sem_ir/type_info.h +++ b/toolchain/sem_ir/type_info.h @@ -147,6 +147,42 @@ struct ReturnTypeInfo { InitRepr init_repr; }; +// Information about the numeric type literal that corresponds to a type. +struct NumericTypeLiteralInfo { + // The kind of a numeric type literal, as determined by the letter that + // prefixes the bit width. + enum Kind : char { + None = 0, + Int = 'i', + UInt = 'u', + Float = 'f', + }; + + static const NumericTypeLiteralInfo Invalid; + + // Returns the numeric type literal that would evaluate to this class type, if + // any. + static auto ForType(const File& file, ClassType class_type) + -> NumericTypeLiteralInfo; + + // Prints the numeric type literal that corresponds to this type. + auto PrintLiteral(const File& file, llvm::raw_ostream& out) const -> void; + + // Gets a string containing the literal. + auto GetLiteralAsString(const File& file) const -> std::string; + + // Returns whether this is a valid numeric type literal. + auto is_valid() const -> bool { return kind != None; } + + // The kind of this type literal. + Kind kind; + // The bit width of this type literal. + IntId bit_width_id; +}; + +inline constexpr NumericTypeLiteralInfo NumericTypeLiteralInfo::Invalid = { + .kind = None, .bit_width_id = IntId::Invalid}; + } // namespace Carbon::SemIR #endif // CARBON_TOOLCHAIN_SEM_IR_TYPE_INFO_H_ diff --git a/toolchain/sem_ir/typed_insts.h b/toolchain/sem_ir/typed_insts.h index b2cdaca8f21a..2b421c85f370 100644 --- a/toolchain/sem_ir/typed_insts.h +++ b/toolchain/sem_ir/typed_insts.h @@ -914,7 +914,9 @@ struct IntLiteralType { TypeId type_id; }; -// An integer type. +// A primitive integer type whose representation and operations are defined by +// the toolchain. The `Core.Int` and `Core.UInt` classes are defined as adapters +// for this type. struct IntType { static constexpr auto Kind = InstKind::IntType.Define( {.ir_name = "int_type",