diff --git a/core/prelude/types.carbon b/core/prelude/types.carbon index a605dbe526fd..e0edc91796c5 100644 --- a/core/prelude/types.carbon +++ b/core/prelude/types.carbon @@ -5,6 +5,7 @@ package Core library "prelude/types"; export import library "prelude/types/bool"; +export import library "prelude/types/char"; export import library "prelude/types/int"; export import library "prelude/types/int_literal"; export import library "prelude/types/optional"; diff --git a/core/prelude/types/char.carbon b/core/prelude/types/char.carbon new file mode 100644 index 000000000000..2e039c7ea10d --- /dev/null +++ b/core/prelude/types/char.carbon @@ -0,0 +1,24 @@ +// 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/char"; + +import library "prelude/destroy"; +import library "prelude/operators"; +import library "prelude/types/uint"; + +fn CharLiteral() -> type = "char_literal.make_type"; + +class Char { + adapt u8; +} + +impl CharLiteral() as ImplicitAs(Char) { + fn Convert[self: Self]() -> Char = "char.convert_checked"; +} + +// TODO: Remove these once ImplicitAs extends As. +impl CharLiteral() as As(Char) { + fn Convert[self: Self]() -> Char = "char.convert_checked"; +} diff --git a/toolchain/check/BUILD b/toolchain/check/BUILD index d6e7d15723f9..bb0d94e3cc28 100644 --- a/toolchain/check/BUILD +++ b/toolchain/check/BUILD @@ -131,6 +131,7 @@ cc_library( "//toolchain/check:scope_stack", "//toolchain/diagnostics:diagnostic_emitter", "//toolchain/diagnostics:format_providers", + "//toolchain/lex:token_info", "//toolchain/lex:token_kind", "//toolchain/lex:tokenized_buffer", "//toolchain/parse:node_kind", @@ -296,6 +297,7 @@ cc_library( hdrs = ["diagnostic_emitter.h"], deps = [ ":context", + "//common:ostream", "//common:raw_string_ostream", "//toolchain/diagnostics:diagnostic_emitter", "//toolchain/lex:token_index", diff --git a/toolchain/check/eval.cpp b/toolchain/check/eval.cpp index d3f96ce059be..2124bcc9efba 100644 --- a/toolchain/check/eval.cpp +++ b/toolchain/check/eval.cpp @@ -9,6 +9,7 @@ #include #include +#include "llvm/Support/ConvertUTF.h" #include "toolchain/base/canonical_value_store.h" #include "toolchain/base/kind_switch.h" #include "toolchain/check/action.h" @@ -951,6 +952,28 @@ static auto PerformArrayIndex(EvalContext& eval_context, SemIR::ArrayIndex inst) return eval_context.GetConstantValue(elements[index_val.getZExtValue()]); } +// Performs a conversion between character types, diagnosing if the value +// doesn't fit in the destination type. +static auto PerformCheckedCharConvert(Context& context, SemIR::LocId loc_id, + SemIR::InstId arg_id, + SemIR::TypeId dest_type_id) + -> SemIR::ConstantId { + auto arg = context.insts().GetAs(arg_id); + + // Values over 0x80 require multiple code units in UTF-8. + if (arg.value.index >= 0x80) { + CARBON_DIAGNOSTIC(CharTooLargeForType, Error, + "character value {0} too large for type {1}", + SemIR::CharId, SemIR::TypeId); + context.emitter().Emit(loc_id, CharTooLargeForType, arg.value, + dest_type_id); + return SemIR::ErrorInst::ConstantId; + } + + llvm::APInt int_val(8, arg.value.index, /*isSigned=*/false); + return MakeIntResult(context, dest_type_id, /*is_signed=*/false, int_val); +} + // Forms a constant int type as an evaluation result. Requires that width_id is // constant. static auto MakeIntTypeResult(Context& context, SemIR::LocId loc_id, @@ -1590,6 +1613,10 @@ static auto MakeConstantForBuiltinCall(EvalContext& eval_context, return MakeFacetTypeResult(eval_context.context(), combined_info, phase); } + case SemIR::BuiltinFunctionKind::CharLiteralMakeType: { + return context.constant_values().Get(SemIR::CharLiteralType::TypeInstId); + } + case SemIR::BuiltinFunctionKind::IntLiteralMakeType: { return context.constant_values().Get(SemIR::IntLiteralType::TypeInstId); } @@ -1619,6 +1646,15 @@ static auto MakeConstantForBuiltinCall(EvalContext& eval_context, return context.constant_values().Get(SemIR::BoolType::TypeInstId); } + // Character conversions. + case SemIR::BuiltinFunctionKind::CharConvertChecked: { + if (phase != Phase::Concrete) { + return MakeConstantResult(context, call, phase); + } + return PerformCheckedCharConvert(context, loc_id, arg_ids[0], + call.type_id); + } + // Integer conversions. case SemIR::BuiltinFunctionKind::IntConvert: { if (phase != Phase::Concrete) { diff --git a/toolchain/check/handle_literal.cpp b/toolchain/check/handle_literal.cpp index b991c078493a..beb899b33aa6 100644 --- a/toolchain/check/handle_literal.cpp +++ b/toolchain/check/handle_literal.cpp @@ -35,6 +35,17 @@ auto HandleParseNode(Context& context, Parse::BoolLiteralTrueId node_id) return true; } +auto HandleParseNode(Context& context, Parse::CharLiteralId node_id) -> bool { + auto value = context.tokens().GetCharLiteralValue( + context.parse_tree().node_token(node_id)); + auto inst_id = AddInst( + context, node_id, + {.type_id = GetSingletonType(context, SemIR::CharLiteralType::TypeInstId), + .value = SemIR::CharId(value.value)}); + context.node_stack().Push(node_id, inst_id); + return true; +} + auto HandleParseNode(Context& context, Parse::IntLiteralId node_id) -> bool { auto int_literal_id = MakeIntLiteral( context, node_id, diff --git a/toolchain/check/literal.cpp b/toolchain/check/literal.cpp index 1c3e12f0049f..e164981696f9 100644 --- a/toolchain/check/literal.cpp +++ b/toolchain/check/literal.cpp @@ -9,6 +9,7 @@ #include "toolchain/check/convert.h" #include "toolchain/check/name_lookup.h" #include "toolchain/check/type.h" +#include "toolchain/lex/token_info.h" #include "toolchain/sem_ir/ids.h" namespace Carbon::Check { diff --git a/toolchain/check/literal.h b/toolchain/check/literal.h index d96b19d94ddc..4c617c36e7c2 100644 --- a/toolchain/check/literal.h +++ b/toolchain/check/literal.h @@ -6,6 +6,7 @@ #define CARBON_TOOLCHAIN_CHECK_LITERAL_H_ #include "toolchain/check/context.h" +#include "toolchain/lex/token_info.h" #include "toolchain/sem_ir/ids.h" namespace Carbon::Check { diff --git a/toolchain/check/testdata/alias/export_name.carbon b/toolchain/check/testdata/alias/export_name.carbon index 19e7baa34285..5405fc99e651 100644 --- a/toolchain/check/testdata/alias/export_name.carbon +++ b/toolchain/check/testdata/alias/export_name.carbon @@ -111,7 +111,7 @@ var d: D* = &c; // CHECK:STDOUT: %Main.C = import_ref Main//base, C, unloaded // CHECK:STDOUT: %Main.D: type = import_ref Main//base, D, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//base, loc4_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst17 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -142,7 +142,7 @@ var d: D* = &c; // CHECK:STDOUT: %Main.C: type = import_ref Main//base, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.D = import_ref Main//base, D, unloaded // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//base, loc4_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst17 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -173,8 +173,8 @@ var d: D* = &c; // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.D: type = import_ref Main//export, D, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.8db: = import_ref Main//export, inst22 [indirect], loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//export, inst23 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.8db: = import_ref Main//export, inst23 [indirect], loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//export, inst24 [indirect], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -257,8 +257,8 @@ var d: D* = &c; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.D: type = import_ref Main//export, D, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.C: type = import_ref Main//export_orig, C, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.8db: = import_ref Main//export_orig, inst22 [indirect], loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//export_orig, inst23 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.8db: = import_ref Main//export_orig, inst23 [indirect], loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//export_orig, inst24 [indirect], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/alias/import.carbon b/toolchain/check/testdata/alias/import.carbon index 4980a275eef7..31dc289b3f0e 100644 --- a/toolchain/check/testdata/alias/import.carbon +++ b/toolchain/check/testdata/alias/import.carbon @@ -120,7 +120,7 @@ var c: () = a_alias_alias; // CHECK:STDOUT: %Main.c_alias: type = import_ref Main//class1, c_alias, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.a = import_ref Main//class1, a, unloaded // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//class1, loc4_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//class1, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//class1, inst17 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -166,8 +166,8 @@ var c: () = a_alias_alias; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.c_alias_alias: type = import_ref Main//class2, c_alias_alias, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.b = import_ref Main//class2, b, unloaded -// CHECK:STDOUT: %Main.import_ref.8db: = import_ref Main//class2, inst23 [indirect], loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//class2, inst24 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.8db: = import_ref Main//class2, inst24 [indirect], loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//class2, inst25 [indirect], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/alias/import_access.carbon b/toolchain/check/testdata/alias/import_access.carbon index 14b019461dbb..8fb2f910ab1c 100644 --- a/toolchain/check/testdata/alias/import_access.carbon +++ b/toolchain/check/testdata/alias/import_access.carbon @@ -97,7 +97,7 @@ var inst: Test.A = {}; // CHECK:STDOUT: %Test.C = import_ref Test//def, C, unloaded // CHECK:STDOUT: %Test.A: type = import_ref Test//def, A, loaded [concrete = constants.%C] // CHECK:STDOUT: %Test.import_ref.8f2: = import_ref Test//def, loc4_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Test.import_ref.2c4 = import_ref Test//def, inst16 [no loc], unloaded +// CHECK:STDOUT: %Test.import_ref.2c4 = import_ref Test//def, inst17 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/alias/import_order.carbon b/toolchain/check/testdata/alias/import_order.carbon index b67dd31321e3..a371014936fe 100644 --- a/toolchain/check/testdata/alias/import_order.carbon +++ b/toolchain/check/testdata/alias/import_order.carbon @@ -99,7 +99,7 @@ var a_val: a = {.v = b_val.v}; // CHECK:STDOUT: %Main.c: type = import_ref Main//a, c, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.d: type = import_ref Main//a, d, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.146: = import_ref Main//a, loc4_22, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//a, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//a, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.f99: %C.elem = import_ref Main//a, loc4_16, loaded [concrete = %.2fc] // CHECK:STDOUT: %.2fc: %C.elem = field_decl v, element0 [concrete] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/basics/raw_sem_ir/builtins.carbon b/toolchain/check/testdata/basics/raw_sem_ir/builtins.carbon index 404e205316da..42cbe8f5d5ac 100644 --- a/toolchain/check/testdata/basics/raw_sem_ir/builtins.carbon +++ b/toolchain/check/testdata/basics/raw_sem_ir/builtins.carbon @@ -19,7 +19,7 @@ // CHECK:STDOUT: ir1: {decl_id: inst, is_export: false} // CHECK:STDOUT: import_ir_insts: {} // CHECK:STDOUT: name_scopes: -// CHECK:STDOUT: name_scope0: {inst: inst14, parent_scope: name_scope, has_error: false, extended_scopes: [], names: {}} +// CHECK:STDOUT: name_scope0: {inst: inst15, parent_scope: name_scope, has_error: false, extended_scopes: [], names: {}} // CHECK:STDOUT: entity_names: {} // CHECK:STDOUT: functions: {} // CHECK:STDOUT: classes: {} @@ -39,6 +39,7 @@ // CHECK:STDOUT: 'inst(AutoType)': {kind: AutoType, type: type(TypeType)} // CHECK:STDOUT: 'inst(BoolType)': {kind: BoolType, type: type(TypeType)} // CHECK:STDOUT: 'inst(BoundMethodType)': {kind: BoundMethodType, type: type(TypeType)} +// CHECK:STDOUT: 'inst(CharLiteralType)': {kind: CharLiteralType, type: type(TypeType)} // CHECK:STDOUT: 'inst(ErrorInst)': {kind: ErrorInst, type: type(Error)} // CHECK:STDOUT: 'inst(ImplWitnessTablePlaceholder)': {kind: ImplWitnessTablePlaceholder, type: type(TypeType)} // CHECK:STDOUT: 'inst(InstType)': {kind: InstType, type: type(TypeType)} @@ -49,13 +50,14 @@ // CHECK:STDOUT: 'inst(StringType)': {kind: StringType, type: type(TypeType)} // CHECK:STDOUT: 'inst(VtableType)': {kind: VtableType, type: type(TypeType)} // CHECK:STDOUT: 'inst(WitnessType)': {kind: WitnessType, type: type(TypeType)} -// CHECK:STDOUT: inst14: {kind: Namespace, arg0: name_scope0, arg1: inst, type: type(inst(NamespaceType))} +// CHECK:STDOUT: inst15: {kind: Namespace, arg0: name_scope0, arg1: inst, type: type(inst(NamespaceType))} // CHECK:STDOUT: constant_values: // CHECK:STDOUT: values: // CHECK:STDOUT: 'inst(TypeType)': concrete_constant(inst(TypeType)) // CHECK:STDOUT: 'inst(AutoType)': concrete_constant(inst(AutoType)) // CHECK:STDOUT: 'inst(BoolType)': concrete_constant(inst(BoolType)) // CHECK:STDOUT: 'inst(BoundMethodType)': concrete_constant(inst(BoundMethodType)) +// CHECK:STDOUT: 'inst(CharLiteralType)': concrete_constant(inst(CharLiteralType)) // CHECK:STDOUT: 'inst(ErrorInst)': concrete_constant(inst(ErrorInst)) // CHECK:STDOUT: 'inst(ImplWitnessTablePlaceholder)': concrete_constant(inst(ImplWitnessTablePlaceholder)) // CHECK:STDOUT: 'inst(InstType)': concrete_constant(inst(InstType)) @@ -66,7 +68,7 @@ // CHECK:STDOUT: 'inst(StringType)': concrete_constant(inst(StringType)) // CHECK:STDOUT: 'inst(VtableType)': concrete_constant(inst(VtableType)) // CHECK:STDOUT: 'inst(WitnessType)': concrete_constant(inst(WitnessType)) -// CHECK:STDOUT: inst14: concrete_constant(inst14) +// CHECK:STDOUT: inst15: concrete_constant(inst15) // CHECK:STDOUT: symbolic_constants: {} // CHECK:STDOUT: inst_blocks: // CHECK:STDOUT: inst_block_empty: {} @@ -74,5 +76,5 @@ // CHECK:STDOUT: imports: {} // CHECK:STDOUT: global_init: {} // CHECK:STDOUT: inst_block4: -// CHECK:STDOUT: 0: inst14 +// CHECK:STDOUT: 0: inst15 // CHECK:STDOUT: ... diff --git a/toolchain/check/testdata/basics/raw_sem_ir/multifile.carbon b/toolchain/check/testdata/basics/raw_sem_ir/multifile.carbon index 7638fabe1428..7ef5498c9f21 100644 --- a/toolchain/check/testdata/basics/raw_sem_ir/multifile.carbon +++ b/toolchain/check/testdata/basics/raw_sem_ir/multifile.carbon @@ -35,7 +35,7 @@ fn B() { // CHECK:STDOUT: ir1: {decl_id: inst, is_export: false} // CHECK:STDOUT: import_ir_insts: {} // CHECK:STDOUT: name_scopes: -// CHECK:STDOUT: name_scope0: {inst: inst14, parent_scope: name_scope, has_error: false, extended_scopes: [], names: {name0: inst15}} +// CHECK:STDOUT: name_scope0: {inst: inst15, parent_scope: name_scope, has_error: false, extended_scopes: [], names: {name0: inst16}} // CHECK:STDOUT: entity_names: {} // CHECK:STDOUT: functions: // CHECK:STDOUT: function0: {name: name0, parent_scope: name_scope0, call_params_id: inst_block_empty, body: [inst_block5]} @@ -51,37 +51,37 @@ fn B() { // CHECK:STDOUT: value_repr: {kind: copy, type: type(Error)} // CHECK:STDOUT: 'type(inst(NamespaceType))': // CHECK:STDOUT: value_repr: {kind: copy, type: type(inst(NamespaceType))} -// CHECK:STDOUT: 'type(inst16)': -// CHECK:STDOUT: value_repr: {kind: none, type: type(inst17)} // CHECK:STDOUT: 'type(inst17)': -// CHECK:STDOUT: value_repr: {kind: none, type: type(inst17)} +// CHECK:STDOUT: value_repr: {kind: none, type: type(inst18)} +// CHECK:STDOUT: 'type(inst18)': +// CHECK:STDOUT: value_repr: {kind: none, type: type(inst18)} // CHECK:STDOUT: insts: -// CHECK:STDOUT: inst14: {kind: Namespace, arg0: name_scope0, arg1: inst, type: type(inst(NamespaceType))} -// CHECK:STDOUT: inst15: {kind: FunctionDecl, arg0: function0, arg1: inst_block_empty, type: type(inst16)} -// CHECK:STDOUT: inst16: {kind: FunctionType, arg0: function0, arg1: specific, type: type(TypeType)} -// CHECK:STDOUT: inst17: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)} -// CHECK:STDOUT: inst18: {kind: StructValue, arg0: inst_block_empty, type: type(inst16)} -// CHECK:STDOUT: inst19: {kind: Return} +// CHECK:STDOUT: inst15: {kind: Namespace, arg0: name_scope0, arg1: inst, type: type(inst(NamespaceType))} +// CHECK:STDOUT: inst16: {kind: FunctionDecl, arg0: function0, arg1: inst_block_empty, type: type(inst17)} +// CHECK:STDOUT: inst17: {kind: FunctionType, arg0: function0, arg1: specific, type: type(TypeType)} +// CHECK:STDOUT: inst18: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)} +// CHECK:STDOUT: inst19: {kind: StructValue, arg0: inst_block_empty, type: type(inst17)} +// CHECK:STDOUT: inst20: {kind: Return} // CHECK:STDOUT: constant_values: // CHECK:STDOUT: values: -// CHECK:STDOUT: inst14: concrete_constant(inst14) -// CHECK:STDOUT: inst15: concrete_constant(inst18) -// CHECK:STDOUT: inst16: concrete_constant(inst16) +// CHECK:STDOUT: inst15: concrete_constant(inst15) +// CHECK:STDOUT: inst16: concrete_constant(inst19) // CHECK:STDOUT: inst17: concrete_constant(inst17) // CHECK:STDOUT: inst18: concrete_constant(inst18) +// CHECK:STDOUT: inst19: concrete_constant(inst19) // CHECK:STDOUT: symbolic_constants: {} // CHECK:STDOUT: inst_blocks: // CHECK:STDOUT: inst_block_empty: {} // CHECK:STDOUT: exports: -// CHECK:STDOUT: 0: inst15 +// CHECK:STDOUT: 0: inst16 // CHECK:STDOUT: imports: {} // CHECK:STDOUT: global_init: {} // CHECK:STDOUT: inst_block4: {} // CHECK:STDOUT: inst_block5: -// CHECK:STDOUT: 0: inst19 +// CHECK:STDOUT: 0: inst20 // CHECK:STDOUT: inst_block6: -// CHECK:STDOUT: 0: inst14 -// CHECK:STDOUT: 1: inst15 +// CHECK:STDOUT: 0: inst15 +// CHECK:STDOUT: 1: inst16 // CHECK:STDOUT: ... // CHECK:STDOUT: --- // CHECK:STDOUT: filename: b.carbon @@ -89,13 +89,13 @@ fn B() { // CHECK:STDOUT: import_irs: // CHECK:STDOUT: ir0: {decl_id: inst, is_export: false} // CHECK:STDOUT: ir1: {decl_id: inst, is_export: false} -// CHECK:STDOUT: ir2: {decl_id: inst15, is_export: false} +// CHECK:STDOUT: ir2: {decl_id: inst16, is_export: false} // CHECK:STDOUT: import_ir_insts: -// CHECK:STDOUT: import_ir_inst0: {ir_id: ir2, inst_id: inst15} -// CHECK:STDOUT: import_ir_inst1: {ir_id: ir2, inst_id: inst15} +// CHECK:STDOUT: import_ir_inst0: {ir_id: ir2, inst_id: inst16} +// CHECK:STDOUT: import_ir_inst1: {ir_id: ir2, inst_id: inst16} // CHECK:STDOUT: name_scopes: -// CHECK:STDOUT: name_scope0: {inst: inst14, parent_scope: name_scope, has_error: false, extended_scopes: [], names: {name1: inst16, name0: inst17}} -// CHECK:STDOUT: name_scope1: {inst: inst16, parent_scope: name_scope0, has_error: false, extended_scopes: [], names: {name1: inst22}} +// CHECK:STDOUT: name_scope0: {inst: inst15, parent_scope: name_scope, has_error: false, extended_scopes: [], names: {name1: inst17, name0: inst18}} +// CHECK:STDOUT: name_scope1: {inst: inst17, parent_scope: name_scope0, has_error: false, extended_scopes: [], names: {name1: inst23}} // CHECK:STDOUT: entity_names: // CHECK:STDOUT: entity_name0: {name: name1, parent_scope: name_scope1, index: -1, is_template: 0} // CHECK:STDOUT: functions: @@ -113,58 +113,58 @@ fn B() { // CHECK:STDOUT: value_repr: {kind: copy, type: type(Error)} // CHECK:STDOUT: 'type(inst(NamespaceType))': // CHECK:STDOUT: value_repr: {kind: copy, type: type(inst(NamespaceType))} -// CHECK:STDOUT: 'type(inst18)': -// CHECK:STDOUT: value_repr: {kind: none, type: type(inst19)} // CHECK:STDOUT: 'type(inst19)': -// CHECK:STDOUT: value_repr: {kind: none, type: type(inst19)} +// CHECK:STDOUT: value_repr: {kind: none, type: type(inst20)} +// CHECK:STDOUT: 'type(inst20)': +// CHECK:STDOUT: value_repr: {kind: none, type: type(inst20)} // CHECK:STDOUT: insts: -// CHECK:STDOUT: inst14: {kind: Namespace, arg0: name_scope0, arg1: inst, type: type(inst(NamespaceType))} -// CHECK:STDOUT: inst15: {kind: ImportDecl, arg0: name1} -// CHECK:STDOUT: inst16: {kind: Namespace, arg0: name_scope1, arg1: inst15, type: type(inst(NamespaceType))} -// CHECK:STDOUT: inst17: {kind: FunctionDecl, arg0: function0, arg1: inst_block_empty, type: type(inst18)} -// CHECK:STDOUT: inst18: {kind: FunctionType, arg0: function0, arg1: specific, type: type(TypeType)} -// CHECK:STDOUT: inst19: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)} -// CHECK:STDOUT: inst20: {kind: StructValue, arg0: inst_block_empty, type: type(inst18)} -// CHECK:STDOUT: inst21: {kind: NameRef, arg0: name1, arg1: inst16, type: type(inst(NamespaceType))} -// CHECK:STDOUT: inst22: {kind: ImportRefLoaded, arg0: import_ir_inst0, arg1: entity_name0, type: type(inst24)} -// CHECK:STDOUT: inst23: {kind: FunctionDecl, arg0: function1, arg1: inst_block_empty, type: type(inst24)} -// CHECK:STDOUT: inst24: {kind: FunctionType, arg0: function1, arg1: specific, type: type(TypeType)} -// CHECK:STDOUT: inst25: {kind: StructValue, arg0: inst_block_empty, type: type(inst24)} -// CHECK:STDOUT: inst26: {kind: NameRef, arg0: name1, arg1: inst22, type: type(inst24)} -// CHECK:STDOUT: inst27: {kind: Call, arg0: inst26, arg1: inst_block_empty, type: type(inst19)} -// CHECK:STDOUT: inst28: {kind: Return} +// CHECK:STDOUT: inst15: {kind: Namespace, arg0: name_scope0, arg1: inst, type: type(inst(NamespaceType))} +// CHECK:STDOUT: inst16: {kind: ImportDecl, arg0: name1} +// CHECK:STDOUT: inst17: {kind: Namespace, arg0: name_scope1, arg1: inst16, type: type(inst(NamespaceType))} +// CHECK:STDOUT: inst18: {kind: FunctionDecl, arg0: function0, arg1: inst_block_empty, type: type(inst19)} +// CHECK:STDOUT: inst19: {kind: FunctionType, arg0: function0, arg1: specific, type: type(TypeType)} +// CHECK:STDOUT: inst20: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)} +// CHECK:STDOUT: inst21: {kind: StructValue, arg0: inst_block_empty, type: type(inst19)} +// CHECK:STDOUT: inst22: {kind: NameRef, arg0: name1, arg1: inst17, type: type(inst(NamespaceType))} +// CHECK:STDOUT: inst23: {kind: ImportRefLoaded, arg0: import_ir_inst0, arg1: entity_name0, type: type(inst25)} +// CHECK:STDOUT: inst24: {kind: FunctionDecl, arg0: function1, arg1: inst_block_empty, type: type(inst25)} +// CHECK:STDOUT: inst25: {kind: FunctionType, arg0: function1, arg1: specific, type: type(TypeType)} +// CHECK:STDOUT: inst26: {kind: StructValue, arg0: inst_block_empty, type: type(inst25)} +// CHECK:STDOUT: inst27: {kind: NameRef, arg0: name1, arg1: inst23, type: type(inst25)} +// CHECK:STDOUT: inst28: {kind: Call, arg0: inst27, arg1: inst_block_empty, type: type(inst20)} +// CHECK:STDOUT: inst29: {kind: Return} // CHECK:STDOUT: constant_values: // CHECK:STDOUT: values: -// CHECK:STDOUT: inst14: concrete_constant(inst14) -// CHECK:STDOUT: inst16: concrete_constant(inst16) -// CHECK:STDOUT: inst17: concrete_constant(inst20) -// CHECK:STDOUT: inst18: concrete_constant(inst18) +// CHECK:STDOUT: inst15: concrete_constant(inst15) +// CHECK:STDOUT: inst17: concrete_constant(inst17) +// CHECK:STDOUT: inst18: concrete_constant(inst21) // CHECK:STDOUT: inst19: concrete_constant(inst19) // CHECK:STDOUT: inst20: concrete_constant(inst20) -// CHECK:STDOUT: inst21: concrete_constant(inst16) -// CHECK:STDOUT: inst22: concrete_constant(inst25) -// CHECK:STDOUT: inst23: concrete_constant(inst25) -// CHECK:STDOUT: inst24: concrete_constant(inst24) +// CHECK:STDOUT: inst21: concrete_constant(inst21) +// CHECK:STDOUT: inst22: concrete_constant(inst17) +// CHECK:STDOUT: inst23: concrete_constant(inst26) +// CHECK:STDOUT: inst24: concrete_constant(inst26) // CHECK:STDOUT: inst25: concrete_constant(inst25) -// CHECK:STDOUT: inst26: concrete_constant(inst25) +// CHECK:STDOUT: inst26: concrete_constant(inst26) +// CHECK:STDOUT: inst27: concrete_constant(inst26) // CHECK:STDOUT: symbolic_constants: {} // CHECK:STDOUT: inst_blocks: // CHECK:STDOUT: inst_block_empty: {} // CHECK:STDOUT: exports: -// CHECK:STDOUT: 0: inst17 +// CHECK:STDOUT: 0: inst18 // CHECK:STDOUT: imports: -// CHECK:STDOUT: 0: inst16 -// CHECK:STDOUT: 1: inst22 -// CHECK:STDOUT: 2: inst23 +// CHECK:STDOUT: 0: inst17 +// CHECK:STDOUT: 1: inst23 +// CHECK:STDOUT: 2: inst24 // CHECK:STDOUT: global_init: {} // CHECK:STDOUT: inst_block4: {} // CHECK:STDOUT: inst_block5: -// CHECK:STDOUT: 0: inst21 -// CHECK:STDOUT: 1: inst26 -// CHECK:STDOUT: 2: inst27 -// CHECK:STDOUT: 3: inst28 +// CHECK:STDOUT: 0: inst22 +// CHECK:STDOUT: 1: inst27 +// CHECK:STDOUT: 2: inst28 +// CHECK:STDOUT: 3: inst29 // CHECK:STDOUT: inst_block6: -// CHECK:STDOUT: 0: inst14 -// CHECK:STDOUT: 1: inst15 -// CHECK:STDOUT: 2: inst17 +// CHECK:STDOUT: 0: inst15 +// CHECK:STDOUT: 1: inst16 +// CHECK:STDOUT: 2: inst18 // CHECK:STDOUT: ... diff --git a/toolchain/check/testdata/basics/raw_sem_ir/multifile_with_textual_ir.carbon b/toolchain/check/testdata/basics/raw_sem_ir/multifile_with_textual_ir.carbon index bd3a5a90d4d2..a7d31e1805d2 100644 --- a/toolchain/check/testdata/basics/raw_sem_ir/multifile_with_textual_ir.carbon +++ b/toolchain/check/testdata/basics/raw_sem_ir/multifile_with_textual_ir.carbon @@ -35,7 +35,7 @@ fn B() { // CHECK:STDOUT: ir1: {decl_id: inst, is_export: false} // CHECK:STDOUT: import_ir_insts: {} // CHECK:STDOUT: name_scopes: -// CHECK:STDOUT: name_scope0: {inst: inst14, parent_scope: name_scope, has_error: false, extended_scopes: [], names: {name0: inst15}} +// CHECK:STDOUT: name_scope0: {inst: inst15, parent_scope: name_scope, has_error: false, extended_scopes: [], names: {name0: inst16}} // CHECK:STDOUT: entity_names: {} // CHECK:STDOUT: functions: // CHECK:STDOUT: function0: {name: name0, parent_scope: name_scope0, call_params_id: inst_block_empty, body: [inst_block5]} @@ -51,37 +51,37 @@ fn B() { // CHECK:STDOUT: value_repr: {kind: copy, type: type(Error)} // CHECK:STDOUT: 'type(inst(NamespaceType))': // CHECK:STDOUT: value_repr: {kind: copy, type: type(inst(NamespaceType))} -// CHECK:STDOUT: 'type(inst16)': -// CHECK:STDOUT: value_repr: {kind: none, type: type(inst17)} // CHECK:STDOUT: 'type(inst17)': -// CHECK:STDOUT: value_repr: {kind: none, type: type(inst17)} +// CHECK:STDOUT: value_repr: {kind: none, type: type(inst18)} +// CHECK:STDOUT: 'type(inst18)': +// CHECK:STDOUT: value_repr: {kind: none, type: type(inst18)} // CHECK:STDOUT: insts: -// CHECK:STDOUT: inst14: {kind: Namespace, arg0: name_scope0, arg1: inst, type: type(inst(NamespaceType))} -// CHECK:STDOUT: inst15: {kind: FunctionDecl, arg0: function0, arg1: inst_block_empty, type: type(inst16)} -// CHECK:STDOUT: inst16: {kind: FunctionType, arg0: function0, arg1: specific, type: type(TypeType)} -// CHECK:STDOUT: inst17: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)} -// CHECK:STDOUT: inst18: {kind: StructValue, arg0: inst_block_empty, type: type(inst16)} -// CHECK:STDOUT: inst19: {kind: Return} +// CHECK:STDOUT: inst15: {kind: Namespace, arg0: name_scope0, arg1: inst, type: type(inst(NamespaceType))} +// CHECK:STDOUT: inst16: {kind: FunctionDecl, arg0: function0, arg1: inst_block_empty, type: type(inst17)} +// CHECK:STDOUT: inst17: {kind: FunctionType, arg0: function0, arg1: specific, type: type(TypeType)} +// CHECK:STDOUT: inst18: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)} +// CHECK:STDOUT: inst19: {kind: StructValue, arg0: inst_block_empty, type: type(inst17)} +// CHECK:STDOUT: inst20: {kind: Return} // CHECK:STDOUT: constant_values: // CHECK:STDOUT: values: -// CHECK:STDOUT: inst14: concrete_constant(inst14) -// CHECK:STDOUT: inst15: concrete_constant(inst18) -// CHECK:STDOUT: inst16: concrete_constant(inst16) +// CHECK:STDOUT: inst15: concrete_constant(inst15) +// CHECK:STDOUT: inst16: concrete_constant(inst19) // CHECK:STDOUT: inst17: concrete_constant(inst17) // CHECK:STDOUT: inst18: concrete_constant(inst18) +// CHECK:STDOUT: inst19: concrete_constant(inst19) // CHECK:STDOUT: symbolic_constants: {} // CHECK:STDOUT: inst_blocks: // CHECK:STDOUT: inst_block_empty: {} // CHECK:STDOUT: exports: -// CHECK:STDOUT: 0: inst15 +// CHECK:STDOUT: 0: inst16 // CHECK:STDOUT: imports: {} // CHECK:STDOUT: global_init: {} // CHECK:STDOUT: inst_block4: {} // CHECK:STDOUT: inst_block5: -// CHECK:STDOUT: 0: inst19 +// CHECK:STDOUT: 0: inst20 // CHECK:STDOUT: inst_block6: -// CHECK:STDOUT: 0: inst14 -// CHECK:STDOUT: 1: inst15 +// CHECK:STDOUT: 0: inst15 +// CHECK:STDOUT: 1: inst16 // CHECK:STDOUT: ... // CHECK:STDOUT: --- a.carbon // CHECK:STDOUT: @@ -108,13 +108,13 @@ fn B() { // CHECK:STDOUT: import_irs: // CHECK:STDOUT: ir0: {decl_id: inst, is_export: false} // CHECK:STDOUT: ir1: {decl_id: inst, is_export: false} -// CHECK:STDOUT: ir2: {decl_id: inst15, is_export: false} +// CHECK:STDOUT: ir2: {decl_id: inst16, is_export: false} // CHECK:STDOUT: import_ir_insts: -// CHECK:STDOUT: import_ir_inst0: {ir_id: ir2, inst_id: inst15} -// CHECK:STDOUT: import_ir_inst1: {ir_id: ir2, inst_id: inst15} +// CHECK:STDOUT: import_ir_inst0: {ir_id: ir2, inst_id: inst16} +// CHECK:STDOUT: import_ir_inst1: {ir_id: ir2, inst_id: inst16} // CHECK:STDOUT: name_scopes: -// CHECK:STDOUT: name_scope0: {inst: inst14, parent_scope: name_scope, has_error: false, extended_scopes: [], names: {name1: inst16, name0: inst17}} -// CHECK:STDOUT: name_scope1: {inst: inst16, parent_scope: name_scope0, has_error: false, extended_scopes: [], names: {name1: inst22}} +// CHECK:STDOUT: name_scope0: {inst: inst15, parent_scope: name_scope, has_error: false, extended_scopes: [], names: {name1: inst17, name0: inst18}} +// CHECK:STDOUT: name_scope1: {inst: inst17, parent_scope: name_scope0, has_error: false, extended_scopes: [], names: {name1: inst23}} // CHECK:STDOUT: entity_names: // CHECK:STDOUT: entity_name0: {name: name1, parent_scope: name_scope1, index: -1, is_template: 0} // CHECK:STDOUT: functions: @@ -132,60 +132,60 @@ fn B() { // CHECK:STDOUT: value_repr: {kind: copy, type: type(Error)} // CHECK:STDOUT: 'type(inst(NamespaceType))': // CHECK:STDOUT: value_repr: {kind: copy, type: type(inst(NamespaceType))} -// CHECK:STDOUT: 'type(inst18)': -// CHECK:STDOUT: value_repr: {kind: none, type: type(inst19)} // CHECK:STDOUT: 'type(inst19)': -// CHECK:STDOUT: value_repr: {kind: none, type: type(inst19)} +// CHECK:STDOUT: value_repr: {kind: none, type: type(inst20)} +// CHECK:STDOUT: 'type(inst20)': +// CHECK:STDOUT: value_repr: {kind: none, type: type(inst20)} // CHECK:STDOUT: insts: -// CHECK:STDOUT: inst14: {kind: Namespace, arg0: name_scope0, arg1: inst, type: type(inst(NamespaceType))} -// CHECK:STDOUT: inst15: {kind: ImportDecl, arg0: name1} -// CHECK:STDOUT: inst16: {kind: Namespace, arg0: name_scope1, arg1: inst15, type: type(inst(NamespaceType))} -// CHECK:STDOUT: inst17: {kind: FunctionDecl, arg0: function0, arg1: inst_block_empty, type: type(inst18)} -// CHECK:STDOUT: inst18: {kind: FunctionType, arg0: function0, arg1: specific, type: type(TypeType)} -// CHECK:STDOUT: inst19: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)} -// CHECK:STDOUT: inst20: {kind: StructValue, arg0: inst_block_empty, type: type(inst18)} -// CHECK:STDOUT: inst21: {kind: NameRef, arg0: name1, arg1: inst16, type: type(inst(NamespaceType))} -// CHECK:STDOUT: inst22: {kind: ImportRefLoaded, arg0: import_ir_inst0, arg1: entity_name0, type: type(inst24)} -// CHECK:STDOUT: inst23: {kind: FunctionDecl, arg0: function1, arg1: inst_block_empty, type: type(inst24)} -// CHECK:STDOUT: inst24: {kind: FunctionType, arg0: function1, arg1: specific, type: type(TypeType)} -// CHECK:STDOUT: inst25: {kind: StructValue, arg0: inst_block_empty, type: type(inst24)} -// CHECK:STDOUT: inst26: {kind: NameRef, arg0: name1, arg1: inst22, type: type(inst24)} -// CHECK:STDOUT: inst27: {kind: Call, arg0: inst26, arg1: inst_block_empty, type: type(inst19)} -// CHECK:STDOUT: inst28: {kind: Return} +// CHECK:STDOUT: inst15: {kind: Namespace, arg0: name_scope0, arg1: inst, type: type(inst(NamespaceType))} +// CHECK:STDOUT: inst16: {kind: ImportDecl, arg0: name1} +// CHECK:STDOUT: inst17: {kind: Namespace, arg0: name_scope1, arg1: inst16, type: type(inst(NamespaceType))} +// CHECK:STDOUT: inst18: {kind: FunctionDecl, arg0: function0, arg1: inst_block_empty, type: type(inst19)} +// CHECK:STDOUT: inst19: {kind: FunctionType, arg0: function0, arg1: specific, type: type(TypeType)} +// CHECK:STDOUT: inst20: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)} +// CHECK:STDOUT: inst21: {kind: StructValue, arg0: inst_block_empty, type: type(inst19)} +// CHECK:STDOUT: inst22: {kind: NameRef, arg0: name1, arg1: inst17, type: type(inst(NamespaceType))} +// CHECK:STDOUT: inst23: {kind: ImportRefLoaded, arg0: import_ir_inst0, arg1: entity_name0, type: type(inst25)} +// CHECK:STDOUT: inst24: {kind: FunctionDecl, arg0: function1, arg1: inst_block_empty, type: type(inst25)} +// CHECK:STDOUT: inst25: {kind: FunctionType, arg0: function1, arg1: specific, type: type(TypeType)} +// CHECK:STDOUT: inst26: {kind: StructValue, arg0: inst_block_empty, type: type(inst25)} +// CHECK:STDOUT: inst27: {kind: NameRef, arg0: name1, arg1: inst23, type: type(inst25)} +// CHECK:STDOUT: inst28: {kind: Call, arg0: inst27, arg1: inst_block_empty, type: type(inst20)} +// CHECK:STDOUT: inst29: {kind: Return} // CHECK:STDOUT: constant_values: // CHECK:STDOUT: values: -// CHECK:STDOUT: inst14: concrete_constant(inst14) -// CHECK:STDOUT: inst16: concrete_constant(inst16) -// CHECK:STDOUT: inst17: concrete_constant(inst20) -// CHECK:STDOUT: inst18: concrete_constant(inst18) +// CHECK:STDOUT: inst15: concrete_constant(inst15) +// CHECK:STDOUT: inst17: concrete_constant(inst17) +// CHECK:STDOUT: inst18: concrete_constant(inst21) // CHECK:STDOUT: inst19: concrete_constant(inst19) // CHECK:STDOUT: inst20: concrete_constant(inst20) -// CHECK:STDOUT: inst21: concrete_constant(inst16) -// CHECK:STDOUT: inst22: concrete_constant(inst25) -// CHECK:STDOUT: inst23: concrete_constant(inst25) -// CHECK:STDOUT: inst24: concrete_constant(inst24) +// CHECK:STDOUT: inst21: concrete_constant(inst21) +// CHECK:STDOUT: inst22: concrete_constant(inst17) +// CHECK:STDOUT: inst23: concrete_constant(inst26) +// CHECK:STDOUT: inst24: concrete_constant(inst26) // CHECK:STDOUT: inst25: concrete_constant(inst25) -// CHECK:STDOUT: inst26: concrete_constant(inst25) +// CHECK:STDOUT: inst26: concrete_constant(inst26) +// CHECK:STDOUT: inst27: concrete_constant(inst26) // CHECK:STDOUT: symbolic_constants: {} // CHECK:STDOUT: inst_blocks: // CHECK:STDOUT: inst_block_empty: {} // CHECK:STDOUT: exports: -// CHECK:STDOUT: 0: inst17 +// CHECK:STDOUT: 0: inst18 // CHECK:STDOUT: imports: -// CHECK:STDOUT: 0: inst16 -// CHECK:STDOUT: 1: inst22 -// CHECK:STDOUT: 2: inst23 +// CHECK:STDOUT: 0: inst17 +// CHECK:STDOUT: 1: inst23 +// CHECK:STDOUT: 2: inst24 // CHECK:STDOUT: global_init: {} // CHECK:STDOUT: inst_block4: {} // CHECK:STDOUT: inst_block5: -// CHECK:STDOUT: 0: inst21 -// CHECK:STDOUT: 1: inst26 -// CHECK:STDOUT: 2: inst27 -// CHECK:STDOUT: 3: inst28 +// CHECK:STDOUT: 0: inst22 +// CHECK:STDOUT: 1: inst27 +// CHECK:STDOUT: 2: inst28 +// CHECK:STDOUT: 3: inst29 // CHECK:STDOUT: inst_block6: -// CHECK:STDOUT: 0: inst14 -// CHECK:STDOUT: 1: inst15 -// CHECK:STDOUT: 2: inst17 +// CHECK:STDOUT: 0: inst15 +// CHECK:STDOUT: 1: inst16 +// CHECK:STDOUT: 2: inst18 // CHECK:STDOUT: ... // CHECK:STDOUT: --- b.carbon // CHECK:STDOUT: diff --git a/toolchain/check/testdata/basics/raw_sem_ir/one_file.carbon b/toolchain/check/testdata/basics/raw_sem_ir/one_file.carbon index e6ab19633723..15c228da0876 100644 --- a/toolchain/check/testdata/basics/raw_sem_ir/one_file.carbon +++ b/toolchain/check/testdata/basics/raw_sem_ir/one_file.carbon @@ -25,15 +25,15 @@ fn Foo[T:! type](n: T) -> (T, ()) { // CHECK:STDOUT: ir1: {decl_id: inst, is_export: false} // CHECK:STDOUT: import_ir_insts: {} // CHECK:STDOUT: name_scopes: -// CHECK:STDOUT: name_scope0: {inst: inst14, parent_scope: name_scope, has_error: false, extended_scopes: [], names: {name0: inst42}} +// CHECK:STDOUT: name_scope0: {inst: inst15, parent_scope: name_scope, has_error: false, extended_scopes: [], names: {name0: inst43}} // CHECK:STDOUT: entity_names: // CHECK:STDOUT: entity_name0: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} // CHECK:STDOUT: entity_name1: {name: name2, parent_scope: name_scope, index: -1, is_template: 0} // CHECK:STDOUT: functions: -// CHECK:STDOUT: function0: {name: name0, parent_scope: name_scope0, call_params_id: inst_block13, return_slot_pattern: inst38, body: [inst_block20]} +// CHECK:STDOUT: function0: {name: name0, parent_scope: name_scope0, call_params_id: inst_block13, return_slot_pattern: inst39, body: [inst_block20]} // CHECK:STDOUT: classes: {} // CHECK:STDOUT: generics: -// CHECK:STDOUT: generic0: {decl: inst42, bindings: inst_block16} +// CHECK:STDOUT: generic0: {decl: inst43, bindings: inst_block16} // CHECK:STDOUT: specifics: // CHECK:STDOUT: specific0: {generic: generic0, args: inst_block17} // CHECK:STDOUT: struct_type_fields: @@ -45,10 +45,10 @@ fn Foo[T:! type](n: T) -> (T, ()) { // CHECK:STDOUT: value_repr: {kind: copy, type: type(Error)} // CHECK:STDOUT: 'type(inst(NamespaceType))': // CHECK:STDOUT: value_repr: {kind: copy, type: type(inst(NamespaceType))} -// CHECK:STDOUT: 'type(inst43)': -// CHECK:STDOUT: value_repr: {kind: none, type: type(inst27)} -// CHECK:STDOUT: 'type(inst27)': -// CHECK:STDOUT: value_repr: {kind: none, type: type(inst27)} +// CHECK:STDOUT: 'type(inst44)': +// CHECK:STDOUT: value_repr: {kind: none, type: type(inst28)} +// CHECK:STDOUT: 'type(inst28)': +// CHECK:STDOUT: value_repr: {kind: none, type: type(inst28)} // CHECK:STDOUT: 'type(symbolic_constant0)': // CHECK:STDOUT: value_repr: {kind: copy, type: type(symbolic_constant0)} // CHECK:STDOUT: 'type(symbolic_constant4)': @@ -62,196 +62,196 @@ fn Foo[T:! type](n: T) -> (T, ()) { // CHECK:STDOUT: 'type(symbolic_constant5)': // CHECK:STDOUT: value_repr: {kind: pointer, type: type(symbolic_constant8)} // CHECK:STDOUT: insts: -// CHECK:STDOUT: inst14: {kind: Namespace, arg0: name_scope0, arg1: inst, type: type(inst(NamespaceType))} -// CHECK:STDOUT: inst15: {kind: BindSymbolicName, arg0: entity_name0, arg1: inst, type: type(TypeType)} +// CHECK:STDOUT: inst15: {kind: Namespace, arg0: name_scope0, arg1: inst, type: type(inst(NamespaceType))} // CHECK:STDOUT: inst16: {kind: BindSymbolicName, arg0: entity_name0, arg1: inst, type: type(TypeType)} // CHECK:STDOUT: inst17: {kind: BindSymbolicName, arg0: entity_name0, arg1: inst, type: type(TypeType)} -// CHECK:STDOUT: inst18: {kind: PatternType, arg0: inst(TypeType), type: type(TypeType)} -// CHECK:STDOUT: inst19: {kind: SymbolicBindingPattern, arg0: entity_name0, type: type(inst18)} -// CHECK:STDOUT: inst20: {kind: NameRef, arg0: name1, arg1: inst15, type: type(TypeType)} -// CHECK:STDOUT: inst21: {kind: BindName, arg0: entity_name1, arg1: inst39, type: type(symbolic_constant1)} -// CHECK:STDOUT: inst22: {kind: PatternType, arg0: inst16, type: type(TypeType)} -// CHECK:STDOUT: inst23: {kind: BindingPattern, arg0: entity_name1, type: type(symbolic_constant3)} -// CHECK:STDOUT: inst24: {kind: PatternType, arg0: inst17, type: type(TypeType)} -// CHECK:STDOUT: inst25: {kind: ValueParamPattern, arg0: inst23, arg1: call_param0, type: type(symbolic_constant3)} -// CHECK:STDOUT: inst26: {kind: NameRef, arg0: name1, arg1: inst15, type: type(TypeType)} -// CHECK:STDOUT: inst27: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)} -// CHECK:STDOUT: inst28: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst27)} -// CHECK:STDOUT: inst29: {kind: TupleType, arg0: inst_block9, type: type(TypeType)} -// CHECK:STDOUT: inst30: {kind: TupleLiteral, arg0: inst_block8, type: type(inst29)} -// CHECK:STDOUT: inst31: {kind: Converted, arg0: inst28, arg1: inst27, type: type(TypeType)} -// CHECK:STDOUT: inst32: {kind: TupleType, arg0: inst_block11, type: type(TypeType)} -// CHECK:STDOUT: inst33: {kind: Converted, arg0: inst30, arg1: inst32, type: type(TypeType)} -// CHECK:STDOUT: inst34: {kind: TupleType, arg0: inst_block12, type: type(TypeType)} -// CHECK:STDOUT: inst35: {kind: PatternType, arg0: inst32, type: type(TypeType)} -// CHECK:STDOUT: inst36: {kind: ReturnSlotPattern, arg0: inst33, type: type(symbolic_constant7)} -// CHECK:STDOUT: inst37: {kind: PatternType, arg0: inst34, type: type(TypeType)} -// CHECK:STDOUT: inst38: {kind: OutParamPattern, arg0: inst36, arg1: call_param1, type: type(symbolic_constant7)} -// CHECK:STDOUT: inst39: {kind: ValueParam, arg0: call_param0, arg1: name2, type: type(symbolic_constant1)} -// CHECK:STDOUT: inst40: {kind: OutParam, arg0: call_param1, arg1: name(ReturnSlot), type: type(symbolic_constant5)} -// CHECK:STDOUT: inst41: {kind: ReturnSlot, arg0: inst32, arg1: inst40, type: type(symbolic_constant5)} -// CHECK:STDOUT: inst42: {kind: FunctionDecl, arg0: function0, arg1: inst_block15, type: type(inst43)} -// CHECK:STDOUT: inst43: {kind: FunctionType, arg0: function0, arg1: specific, type: type(TypeType)} -// CHECK:STDOUT: inst44: {kind: StructValue, arg0: inst_block_empty, type: type(inst43)} -// CHECK:STDOUT: inst45: {kind: PointerType, arg0: inst32, type: type(TypeType)} -// CHECK:STDOUT: inst46: {kind: RequireCompleteType, arg0: inst32, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst47: {kind: RequireCompleteType, arg0: inst32, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst48: {kind: RequireCompleteType, arg0: inst34, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst49: {kind: RequireCompleteType, arg0: inst16, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst50: {kind: RequireCompleteType, arg0: inst16, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst18: {kind: BindSymbolicName, arg0: entity_name0, arg1: inst, type: type(TypeType)} +// CHECK:STDOUT: inst19: {kind: PatternType, arg0: inst(TypeType), type: type(TypeType)} +// CHECK:STDOUT: inst20: {kind: SymbolicBindingPattern, arg0: entity_name0, type: type(inst19)} +// CHECK:STDOUT: inst21: {kind: NameRef, arg0: name1, arg1: inst16, type: type(TypeType)} +// CHECK:STDOUT: inst22: {kind: BindName, arg0: entity_name1, arg1: inst40, type: type(symbolic_constant1)} +// CHECK:STDOUT: inst23: {kind: PatternType, arg0: inst17, type: type(TypeType)} +// CHECK:STDOUT: inst24: {kind: BindingPattern, arg0: entity_name1, type: type(symbolic_constant3)} +// CHECK:STDOUT: inst25: {kind: PatternType, arg0: inst18, type: type(TypeType)} +// CHECK:STDOUT: inst26: {kind: ValueParamPattern, arg0: inst24, arg1: call_param0, type: type(symbolic_constant3)} +// CHECK:STDOUT: inst27: {kind: NameRef, arg0: name1, arg1: inst16, type: type(TypeType)} +// CHECK:STDOUT: inst28: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)} +// CHECK:STDOUT: inst29: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst28)} +// CHECK:STDOUT: inst30: {kind: TupleType, arg0: inst_block9, type: type(TypeType)} +// CHECK:STDOUT: inst31: {kind: TupleLiteral, arg0: inst_block8, type: type(inst30)} +// CHECK:STDOUT: inst32: {kind: Converted, arg0: inst29, arg1: inst28, type: type(TypeType)} +// CHECK:STDOUT: inst33: {kind: TupleType, arg0: inst_block11, type: type(TypeType)} +// CHECK:STDOUT: inst34: {kind: Converted, arg0: inst31, arg1: inst33, type: type(TypeType)} +// CHECK:STDOUT: inst35: {kind: TupleType, arg0: inst_block12, type: type(TypeType)} +// CHECK:STDOUT: inst36: {kind: PatternType, arg0: inst33, type: type(TypeType)} +// CHECK:STDOUT: inst37: {kind: ReturnSlotPattern, arg0: inst34, type: type(symbolic_constant7)} +// CHECK:STDOUT: inst38: {kind: PatternType, arg0: inst35, type: type(TypeType)} +// CHECK:STDOUT: inst39: {kind: OutParamPattern, arg0: inst37, arg1: call_param1, type: type(symbolic_constant7)} +// CHECK:STDOUT: inst40: {kind: ValueParam, arg0: call_param0, arg1: name2, type: type(symbolic_constant1)} +// CHECK:STDOUT: inst41: {kind: OutParam, arg0: call_param1, arg1: name(ReturnSlot), type: type(symbolic_constant5)} +// CHECK:STDOUT: inst42: {kind: ReturnSlot, arg0: inst33, arg1: inst41, type: type(symbolic_constant5)} +// CHECK:STDOUT: inst43: {kind: FunctionDecl, arg0: function0, arg1: inst_block15, type: type(inst44)} +// CHECK:STDOUT: inst44: {kind: FunctionType, arg0: function0, arg1: specific, type: type(TypeType)} +// CHECK:STDOUT: inst45: {kind: StructValue, arg0: inst_block_empty, type: type(inst44)} +// CHECK:STDOUT: inst46: {kind: PointerType, arg0: inst33, type: type(TypeType)} +// CHECK:STDOUT: inst47: {kind: RequireCompleteType, arg0: inst33, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst48: {kind: RequireCompleteType, arg0: inst33, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst49: {kind: RequireCompleteType, arg0: inst35, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst50: {kind: RequireCompleteType, arg0: inst17, type: type(inst(WitnessType))} // CHECK:STDOUT: inst51: {kind: RequireCompleteType, arg0: inst17, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst52: {kind: NameRef, arg0: name2, arg1: inst21, type: type(symbolic_constant1)} -// CHECK:STDOUT: inst53: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst27)} -// CHECK:STDOUT: inst54: {kind: TupleLiteral, arg0: inst_block21, type: type(symbolic_constant5)} -// CHECK:STDOUT: inst55: {kind: RequireCompleteType, arg0: inst32, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst56: {kind: TupleAccess, arg0: inst41, arg1: element0, type: type(symbolic_constant1)} -// CHECK:STDOUT: inst57: {kind: RequireCompleteType, arg0: inst16, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst58: {kind: InitializeFrom, arg0: inst52, arg1: inst56, type: type(symbolic_constant1)} -// CHECK:STDOUT: inst59: {kind: TupleAccess, arg0: inst41, arg1: element1, type: type(inst27)} -// CHECK:STDOUT: inst60: {kind: TupleInit, arg0: inst_block_empty, arg1: inst59, type: type(inst27)} -// CHECK:STDOUT: inst61: {kind: TupleValue, arg0: inst_block_empty, type: type(inst27)} -// CHECK:STDOUT: inst62: {kind: Converted, arg0: inst53, arg1: inst60, type: type(inst27)} -// CHECK:STDOUT: inst63: {kind: TupleInit, arg0: inst_block22, arg1: inst41, type: type(symbolic_constant5)} -// CHECK:STDOUT: inst64: {kind: Converted, arg0: inst54, arg1: inst63, type: type(symbolic_constant5)} -// CHECK:STDOUT: inst65: {kind: ReturnExpr, arg0: inst64, arg1: inst41} +// CHECK:STDOUT: inst52: {kind: RequireCompleteType, arg0: inst18, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst53: {kind: NameRef, arg0: name2, arg1: inst22, type: type(symbolic_constant1)} +// CHECK:STDOUT: inst54: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst28)} +// CHECK:STDOUT: inst55: {kind: TupleLiteral, arg0: inst_block21, type: type(symbolic_constant5)} +// CHECK:STDOUT: inst56: {kind: RequireCompleteType, arg0: inst33, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst57: {kind: TupleAccess, arg0: inst42, arg1: element0, type: type(symbolic_constant1)} +// CHECK:STDOUT: inst58: {kind: RequireCompleteType, arg0: inst17, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst59: {kind: InitializeFrom, arg0: inst53, arg1: inst57, type: type(symbolic_constant1)} +// CHECK:STDOUT: inst60: {kind: TupleAccess, arg0: inst42, arg1: element1, type: type(inst28)} +// CHECK:STDOUT: inst61: {kind: TupleInit, arg0: inst_block_empty, arg1: inst60, type: type(inst28)} +// CHECK:STDOUT: inst62: {kind: TupleValue, arg0: inst_block_empty, type: type(inst28)} +// CHECK:STDOUT: inst63: {kind: Converted, arg0: inst54, arg1: inst61, type: type(inst28)} +// CHECK:STDOUT: inst64: {kind: TupleInit, arg0: inst_block22, arg1: inst42, type: type(symbolic_constant5)} +// CHECK:STDOUT: inst65: {kind: Converted, arg0: inst55, arg1: inst64, type: type(symbolic_constant5)} +// CHECK:STDOUT: inst66: {kind: ReturnExpr, arg0: inst65, arg1: inst42} // CHECK:STDOUT: constant_values: // CHECK:STDOUT: values: -// CHECK:STDOUT: inst14: concrete_constant(inst14) -// CHECK:STDOUT: inst15: symbolic_constant1 -// CHECK:STDOUT: inst16: symbolic_constant0 -// CHECK:STDOUT: inst17: symbolic_constant1 -// CHECK:STDOUT: inst18: concrete_constant(inst18) +// CHECK:STDOUT: inst15: concrete_constant(inst15) +// CHECK:STDOUT: inst16: symbolic_constant1 +// CHECK:STDOUT: inst17: symbolic_constant0 +// CHECK:STDOUT: inst18: symbolic_constant1 // CHECK:STDOUT: inst19: concrete_constant(inst19) -// CHECK:STDOUT: inst20: symbolic_constant1 -// CHECK:STDOUT: inst22: symbolic_constant2 -// CHECK:STDOUT: inst23: concrete_constant(inst23) -// CHECK:STDOUT: inst24: symbolic_constant3 -// CHECK:STDOUT: inst25: concrete_constant(inst25) -// CHECK:STDOUT: inst26: symbolic_constant1 -// CHECK:STDOUT: inst27: concrete_constant(inst27) -// CHECK:STDOUT: inst29: concrete_constant(inst29) -// CHECK:STDOUT: inst31: concrete_constant(inst27) -// CHECK:STDOUT: inst32: symbolic_constant4 -// CHECK:STDOUT: inst33: symbolic_constant5 +// CHECK:STDOUT: inst20: concrete_constant(inst20) +// CHECK:STDOUT: inst21: symbolic_constant1 +// CHECK:STDOUT: inst23: symbolic_constant2 +// CHECK:STDOUT: inst24: concrete_constant(inst24) +// CHECK:STDOUT: inst25: symbolic_constant3 +// CHECK:STDOUT: inst26: concrete_constant(inst26) +// CHECK:STDOUT: inst27: symbolic_constant1 +// CHECK:STDOUT: inst28: concrete_constant(inst28) +// CHECK:STDOUT: inst30: concrete_constant(inst30) +// CHECK:STDOUT: inst32: concrete_constant(inst28) +// CHECK:STDOUT: inst33: symbolic_constant4 // CHECK:STDOUT: inst34: symbolic_constant5 -// CHECK:STDOUT: inst35: symbolic_constant6 -// CHECK:STDOUT: inst36: concrete_constant(inst36) -// CHECK:STDOUT: inst37: symbolic_constant7 -// CHECK:STDOUT: inst38: concrete_constant(inst38) -// CHECK:STDOUT: inst42: concrete_constant(inst44) -// CHECK:STDOUT: inst43: concrete_constant(inst43) +// CHECK:STDOUT: inst35: symbolic_constant5 +// CHECK:STDOUT: inst36: symbolic_constant6 +// CHECK:STDOUT: inst37: concrete_constant(inst37) +// CHECK:STDOUT: inst38: symbolic_constant7 +// CHECK:STDOUT: inst39: concrete_constant(inst39) +// CHECK:STDOUT: inst43: concrete_constant(inst45) // CHECK:STDOUT: inst44: concrete_constant(inst44) -// CHECK:STDOUT: inst45: symbolic_constant8 -// CHECK:STDOUT: inst46: symbolic_constant10 -// CHECK:STDOUT: inst47: symbolic_constant9 -// CHECK:STDOUT: inst48: symbolic_constant10 -// CHECK:STDOUT: inst49: symbolic_constant12 -// CHECK:STDOUT: inst50: symbolic_constant11 -// CHECK:STDOUT: inst51: symbolic_constant12 -// CHECK:STDOUT: inst55: symbolic_constant10 -// CHECK:STDOUT: inst57: symbolic_constant12 -// CHECK:STDOUT: inst60: concrete_constant(inst61) -// CHECK:STDOUT: inst61: concrete_constant(inst61) -// CHECK:STDOUT: inst62: concrete_constant(inst61) +// CHECK:STDOUT: inst45: concrete_constant(inst45) +// CHECK:STDOUT: inst46: symbolic_constant8 +// CHECK:STDOUT: inst47: symbolic_constant10 +// CHECK:STDOUT: inst48: symbolic_constant9 +// CHECK:STDOUT: inst49: symbolic_constant10 +// CHECK:STDOUT: inst50: symbolic_constant12 +// CHECK:STDOUT: inst51: symbolic_constant11 +// CHECK:STDOUT: inst52: symbolic_constant12 +// CHECK:STDOUT: inst56: symbolic_constant10 +// CHECK:STDOUT: inst58: symbolic_constant12 +// CHECK:STDOUT: inst61: concrete_constant(inst62) +// CHECK:STDOUT: inst62: concrete_constant(inst62) +// CHECK:STDOUT: inst63: concrete_constant(inst62) // CHECK:STDOUT: symbolic_constants: -// CHECK:STDOUT: symbolic_constant0: {inst: inst16, generic: generic, index: generic_inst, kind: checked} -// CHECK:STDOUT: symbolic_constant1: {inst: inst16, generic: generic0, index: generic_inst_in_decl0, kind: checked} -// CHECK:STDOUT: symbolic_constant2: {inst: inst22, generic: generic, index: generic_inst, kind: checked} -// CHECK:STDOUT: symbolic_constant3: {inst: inst22, generic: generic0, index: generic_inst_in_decl1, kind: checked} -// CHECK:STDOUT: symbolic_constant4: {inst: inst32, generic: generic, index: generic_inst, kind: checked} -// CHECK:STDOUT: symbolic_constant5: {inst: inst32, generic: generic0, index: generic_inst_in_decl2, kind: checked} -// CHECK:STDOUT: symbolic_constant6: {inst: inst35, generic: generic, index: generic_inst, kind: checked} -// CHECK:STDOUT: symbolic_constant7: {inst: inst35, generic: generic0, index: generic_inst_in_decl3, kind: checked} -// CHECK:STDOUT: symbolic_constant8: {inst: inst45, generic: generic, index: generic_inst, kind: checked} -// CHECK:STDOUT: symbolic_constant9: {inst: inst47, generic: generic, index: generic_inst, kind: checked} -// CHECK:STDOUT: symbolic_constant10: {inst: inst47, generic: generic0, index: generic_inst_in_def0, kind: checked} -// CHECK:STDOUT: symbolic_constant11: {inst: inst50, generic: generic, index: generic_inst, kind: checked} -// CHECK:STDOUT: symbolic_constant12: {inst: inst50, generic: generic0, index: generic_inst_in_def1, kind: checked} +// CHECK:STDOUT: symbolic_constant0: {inst: inst17, generic: generic, index: generic_inst, kind: checked} +// CHECK:STDOUT: symbolic_constant1: {inst: inst17, generic: generic0, index: generic_inst_in_decl0, kind: checked} +// CHECK:STDOUT: symbolic_constant2: {inst: inst23, generic: generic, index: generic_inst, kind: checked} +// CHECK:STDOUT: symbolic_constant3: {inst: inst23, generic: generic0, index: generic_inst_in_decl1, kind: checked} +// CHECK:STDOUT: symbolic_constant4: {inst: inst33, generic: generic, index: generic_inst, kind: checked} +// CHECK:STDOUT: symbolic_constant5: {inst: inst33, generic: generic0, index: generic_inst_in_decl2, kind: checked} +// CHECK:STDOUT: symbolic_constant6: {inst: inst36, generic: generic, index: generic_inst, kind: checked} +// CHECK:STDOUT: symbolic_constant7: {inst: inst36, generic: generic0, index: generic_inst_in_decl3, kind: checked} +// CHECK:STDOUT: symbolic_constant8: {inst: inst46, generic: generic, index: generic_inst, kind: checked} +// CHECK:STDOUT: symbolic_constant9: {inst: inst48, generic: generic, index: generic_inst, kind: checked} +// CHECK:STDOUT: symbolic_constant10: {inst: inst48, generic: generic0, index: generic_inst_in_def0, kind: checked} +// CHECK:STDOUT: symbolic_constant11: {inst: inst51, generic: generic, index: generic_inst, kind: checked} +// CHECK:STDOUT: symbolic_constant12: {inst: inst51, generic: generic0, index: generic_inst_in_def1, kind: checked} // CHECK:STDOUT: inst_blocks: // CHECK:STDOUT: inst_block_empty: {} // CHECK:STDOUT: exports: -// CHECK:STDOUT: 0: inst42 +// CHECK:STDOUT: 0: inst43 // CHECK:STDOUT: imports: {} // CHECK:STDOUT: global_init: {} // CHECK:STDOUT: inst_block4: {} // CHECK:STDOUT: inst_block5: -// CHECK:STDOUT: 0: inst19 -// CHECK:STDOUT: inst_block6: // CHECK:STDOUT: 0: inst20 +// CHECK:STDOUT: inst_block6: +// CHECK:STDOUT: 0: inst21 // CHECK:STDOUT: inst_block7: -// CHECK:STDOUT: 0: inst25 -// CHECK:STDOUT: inst_block8: // CHECK:STDOUT: 0: inst26 -// CHECK:STDOUT: 1: inst28 +// CHECK:STDOUT: inst_block8: +// CHECK:STDOUT: 0: inst27 +// CHECK:STDOUT: 1: inst29 // CHECK:STDOUT: inst_block9: // CHECK:STDOUT: 0: inst(TypeType) -// CHECK:STDOUT: 1: inst27 -// CHECK:STDOUT: inst_block10: -// CHECK:STDOUT: 0: inst26 -// CHECK:STDOUT: 1: inst31 -// CHECK:STDOUT: inst_block11: -// CHECK:STDOUT: 0: inst16 -// CHECK:STDOUT: 1: inst27 -// CHECK:STDOUT: inst_block12: -// CHECK:STDOUT: 0: inst17 -// CHECK:STDOUT: 1: inst27 -// CHECK:STDOUT: inst_block13: -// CHECK:STDOUT: 0: inst39 -// CHECK:STDOUT: 1: inst40 -// CHECK:STDOUT: inst_block14: -// CHECK:STDOUT: 0: inst19 -// CHECK:STDOUT: 1: inst23 -// CHECK:STDOUT: 2: inst25 -// CHECK:STDOUT: 3: inst36 -// CHECK:STDOUT: 4: inst38 -// CHECK:STDOUT: inst_block15: -// CHECK:STDOUT: 0: inst26 // CHECK:STDOUT: 1: inst28 -// CHECK:STDOUT: 2: inst30 -// CHECK:STDOUT: 3: inst31 -// CHECK:STDOUT: 4: inst33 -// CHECK:STDOUT: 5: inst15 -// CHECK:STDOUT: 6: inst39 -// CHECK:STDOUT: 7: inst20 -// CHECK:STDOUT: 8: inst21 -// CHECK:STDOUT: 9: inst40 -// CHECK:STDOUT: 10: inst41 -// CHECK:STDOUT: inst_block16: -// CHECK:STDOUT: 0: inst15 -// CHECK:STDOUT: inst_block17: -// CHECK:STDOUT: 0: inst16 -// CHECK:STDOUT: inst_block18: +// CHECK:STDOUT: inst_block10: +// CHECK:STDOUT: 0: inst27 +// CHECK:STDOUT: 1: inst32 +// CHECK:STDOUT: inst_block11: // CHECK:STDOUT: 0: inst17 +// CHECK:STDOUT: 1: inst28 +// CHECK:STDOUT: inst_block12: +// CHECK:STDOUT: 0: inst18 +// CHECK:STDOUT: 1: inst28 +// CHECK:STDOUT: inst_block13: +// CHECK:STDOUT: 0: inst40 +// CHECK:STDOUT: 1: inst41 +// CHECK:STDOUT: inst_block14: +// CHECK:STDOUT: 0: inst20 // CHECK:STDOUT: 1: inst24 -// CHECK:STDOUT: 2: inst34 +// CHECK:STDOUT: 2: inst26 // CHECK:STDOUT: 3: inst37 -// CHECK:STDOUT: inst_block19: +// CHECK:STDOUT: 4: inst39 +// CHECK:STDOUT: inst_block15: +// CHECK:STDOUT: 0: inst27 +// CHECK:STDOUT: 1: inst29 +// CHECK:STDOUT: 2: inst31 +// CHECK:STDOUT: 3: inst32 +// CHECK:STDOUT: 4: inst34 +// CHECK:STDOUT: 5: inst16 +// CHECK:STDOUT: 6: inst40 +// CHECK:STDOUT: 7: inst21 +// CHECK:STDOUT: 8: inst22 +// CHECK:STDOUT: 9: inst41 +// CHECK:STDOUT: 10: inst42 +// CHECK:STDOUT: inst_block16: // CHECK:STDOUT: 0: inst16 -// CHECK:STDOUT: 1: inst22 -// CHECK:STDOUT: 2: inst32 -// CHECK:STDOUT: 3: inst35 +// CHECK:STDOUT: inst_block17: +// CHECK:STDOUT: 0: inst17 +// CHECK:STDOUT: inst_block18: +// CHECK:STDOUT: 0: inst18 +// CHECK:STDOUT: 1: inst25 +// CHECK:STDOUT: 2: inst35 +// CHECK:STDOUT: 3: inst38 +// CHECK:STDOUT: inst_block19: +// CHECK:STDOUT: 0: inst17 +// CHECK:STDOUT: 1: inst23 +// CHECK:STDOUT: 2: inst33 +// CHECK:STDOUT: 3: inst36 // CHECK:STDOUT: inst_block20: -// CHECK:STDOUT: 0: inst52 -// CHECK:STDOUT: 1: inst53 -// CHECK:STDOUT: 2: inst54 -// CHECK:STDOUT: 3: inst56 -// CHECK:STDOUT: 4: inst58 -// CHECK:STDOUT: 5: inst59 -// CHECK:STDOUT: 6: inst60 -// CHECK:STDOUT: 7: inst62 -// CHECK:STDOUT: 8: inst63 -// CHECK:STDOUT: 9: inst64 -// CHECK:STDOUT: 10: inst65 +// CHECK:STDOUT: 0: inst53 +// CHECK:STDOUT: 1: inst54 +// CHECK:STDOUT: 2: inst55 +// CHECK:STDOUT: 3: inst57 +// CHECK:STDOUT: 4: inst59 +// CHECK:STDOUT: 5: inst60 +// CHECK:STDOUT: 6: inst61 +// CHECK:STDOUT: 7: inst63 +// CHECK:STDOUT: 8: inst64 +// CHECK:STDOUT: 9: inst65 +// CHECK:STDOUT: 10: inst66 // CHECK:STDOUT: inst_block21: -// CHECK:STDOUT: 0: inst52 -// CHECK:STDOUT: 1: inst53 +// CHECK:STDOUT: 0: inst53 +// CHECK:STDOUT: 1: inst54 // CHECK:STDOUT: inst_block22: -// CHECK:STDOUT: 0: inst58 -// CHECK:STDOUT: 1: inst62 +// CHECK:STDOUT: 0: inst59 +// CHECK:STDOUT: 1: inst63 // CHECK:STDOUT: inst_block23: -// CHECK:STDOUT: 0: inst48 -// CHECK:STDOUT: 1: inst51 +// CHECK:STDOUT: 0: inst49 +// CHECK:STDOUT: 1: inst52 // CHECK:STDOUT: inst_block24: -// CHECK:STDOUT: 0: inst14 -// CHECK:STDOUT: 1: inst42 +// CHECK:STDOUT: 0: inst15 +// CHECK:STDOUT: 1: inst43 // CHECK:STDOUT: ... diff --git a/toolchain/check/testdata/basics/raw_sem_ir/one_file_with_textual_ir.carbon b/toolchain/check/testdata/basics/raw_sem_ir/one_file_with_textual_ir.carbon index b5bf557fd7a5..9ea0ad3ceedc 100644 --- a/toolchain/check/testdata/basics/raw_sem_ir/one_file_with_textual_ir.carbon +++ b/toolchain/check/testdata/basics/raw_sem_ir/one_file_with_textual_ir.carbon @@ -25,11 +25,11 @@ fn Foo(n: ()) -> ((), ()) { // CHECK:STDOUT: ir1: {decl_id: inst, is_export: false} // CHECK:STDOUT: import_ir_insts: {} // CHECK:STDOUT: name_scopes: -// CHECK:STDOUT: name_scope0: {inst: inst14, parent_scope: name_scope, has_error: false, extended_scopes: [], names: {name0: inst36}} +// CHECK:STDOUT: name_scope0: {inst: inst15, parent_scope: name_scope, has_error: false, extended_scopes: [], names: {name0: inst37}} // CHECK:STDOUT: entity_names: // CHECK:STDOUT: entity_name0: {name: name1, parent_scope: name_scope, index: -1, is_template: 0} // CHECK:STDOUT: functions: -// CHECK:STDOUT: function0: {name: name0, parent_scope: name_scope0, call_params_id: inst_block9, return_slot_pattern: inst31, body: [inst_block12]} +// CHECK:STDOUT: function0: {name: name0, parent_scope: name_scope0, call_params_id: inst_block9, return_slot_pattern: inst32, body: [inst_block12]} // CHECK:STDOUT: classes: {} // CHECK:STDOUT: generics: {} // CHECK:STDOUT: specifics: {} @@ -42,150 +42,150 @@ fn Foo(n: ()) -> ((), ()) { // CHECK:STDOUT: value_repr: {kind: copy, type: type(Error)} // CHECK:STDOUT: 'type(inst(NamespaceType))': // CHECK:STDOUT: value_repr: {kind: copy, type: type(inst(NamespaceType))} -// CHECK:STDOUT: 'type(inst37)': -// CHECK:STDOUT: value_repr: {kind: none, type: type(inst15)} -// CHECK:STDOUT: 'type(inst15)': -// CHECK:STDOUT: value_repr: {kind: none, type: type(inst15)} -// CHECK:STDOUT: 'type(inst24)': -// CHECK:STDOUT: value_repr: {kind: pointer, type: type(inst39)} -// CHECK:STDOUT: 'type(inst39)': -// CHECK:STDOUT: value_repr: {kind: copy, type: type(inst39)} +// CHECK:STDOUT: 'type(inst38)': +// CHECK:STDOUT: value_repr: {kind: none, type: type(inst16)} +// CHECK:STDOUT: 'type(inst16)': +// CHECK:STDOUT: value_repr: {kind: none, type: type(inst16)} +// CHECK:STDOUT: 'type(inst25)': +// CHECK:STDOUT: value_repr: {kind: pointer, type: type(inst40)} +// CHECK:STDOUT: 'type(inst40)': +// CHECK:STDOUT: value_repr: {kind: copy, type: type(inst40)} // CHECK:STDOUT: insts: -// CHECK:STDOUT: inst14: {kind: Namespace, arg0: name_scope0, arg1: inst, type: type(inst(NamespaceType))} -// CHECK:STDOUT: inst15: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)} -// CHECK:STDOUT: inst16: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst15)} -// CHECK:STDOUT: inst17: {kind: Converted, arg0: inst16, arg1: inst15, type: type(TypeType)} -// CHECK:STDOUT: inst18: {kind: BindName, arg0: entity_name0, arg1: inst32, type: type(inst15)} -// CHECK:STDOUT: inst19: {kind: PatternType, arg0: inst15, type: type(TypeType)} -// CHECK:STDOUT: inst20: {kind: BindingPattern, arg0: entity_name0, type: type(inst19)} -// CHECK:STDOUT: inst21: {kind: ValueParamPattern, arg0: inst20, arg1: call_param0, type: type(inst19)} -// CHECK:STDOUT: inst22: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst15)} -// CHECK:STDOUT: inst23: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst15)} -// CHECK:STDOUT: inst24: {kind: TupleType, arg0: inst_block7, type: type(TypeType)} -// CHECK:STDOUT: inst25: {kind: TupleLiteral, arg0: inst_block6, type: type(inst24)} -// CHECK:STDOUT: inst26: {kind: Converted, arg0: inst22, arg1: inst15, type: type(TypeType)} -// CHECK:STDOUT: inst27: {kind: Converted, arg0: inst23, arg1: inst15, type: type(TypeType)} -// CHECK:STDOUT: inst28: {kind: Converted, arg0: inst25, arg1: inst24, type: type(TypeType)} -// CHECK:STDOUT: inst29: {kind: PatternType, arg0: inst24, type: type(TypeType)} -// CHECK:STDOUT: inst30: {kind: ReturnSlotPattern, arg0: inst28, type: type(inst29)} -// CHECK:STDOUT: inst31: {kind: OutParamPattern, arg0: inst30, arg1: call_param1, type: type(inst29)} -// CHECK:STDOUT: inst32: {kind: ValueParam, arg0: call_param0, arg1: name1, type: type(inst15)} -// CHECK:STDOUT: inst33: {kind: SpliceBlock, arg0: inst_block4, arg1: inst17, type: type(TypeType)} -// CHECK:STDOUT: inst34: {kind: OutParam, arg0: call_param1, arg1: name(ReturnSlot), type: type(inst24)} -// CHECK:STDOUT: inst35: {kind: ReturnSlot, arg0: inst24, arg1: inst34, type: type(inst24)} -// CHECK:STDOUT: inst36: {kind: FunctionDecl, arg0: function0, arg1: inst_block11, type: type(inst37)} -// CHECK:STDOUT: inst37: {kind: FunctionType, arg0: function0, arg1: specific, type: type(TypeType)} -// CHECK:STDOUT: inst38: {kind: StructValue, arg0: inst_block_empty, type: type(inst37)} -// CHECK:STDOUT: inst39: {kind: PointerType, arg0: inst24, type: type(TypeType)} -// CHECK:STDOUT: inst40: {kind: NameRef, arg0: name1, arg1: inst18, type: type(inst15)} -// CHECK:STDOUT: inst41: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst15)} -// CHECK:STDOUT: inst42: {kind: TupleLiteral, arg0: inst_block13, type: type(inst24)} -// CHECK:STDOUT: inst43: {kind: TupleAccess, arg0: inst35, arg1: element0, type: type(inst15)} -// CHECK:STDOUT: inst44: {kind: TupleInit, arg0: inst_block14, arg1: inst43, type: type(inst15)} -// CHECK:STDOUT: inst45: {kind: TupleValue, arg0: inst_block_empty, type: type(inst15)} -// CHECK:STDOUT: inst46: {kind: Converted, arg0: inst40, arg1: inst44, type: type(inst15)} -// CHECK:STDOUT: inst47: {kind: TupleAccess, arg0: inst35, arg1: element1, type: type(inst15)} -// CHECK:STDOUT: inst48: {kind: TupleInit, arg0: inst_block_empty, arg1: inst47, type: type(inst15)} -// CHECK:STDOUT: inst49: {kind: Converted, arg0: inst41, arg1: inst48, type: type(inst15)} -// CHECK:STDOUT: inst50: {kind: TupleInit, arg0: inst_block15, arg1: inst35, type: type(inst24)} -// CHECK:STDOUT: inst51: {kind: TupleValue, arg0: inst_block16, type: type(inst24)} -// CHECK:STDOUT: inst52: {kind: Converted, arg0: inst42, arg1: inst50, type: type(inst24)} -// CHECK:STDOUT: inst53: {kind: ReturnExpr, arg0: inst52, arg1: inst35} +// CHECK:STDOUT: inst15: {kind: Namespace, arg0: name_scope0, arg1: inst, type: type(inst(NamespaceType))} +// CHECK:STDOUT: inst16: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)} +// CHECK:STDOUT: inst17: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst16)} +// CHECK:STDOUT: inst18: {kind: Converted, arg0: inst17, arg1: inst16, type: type(TypeType)} +// CHECK:STDOUT: inst19: {kind: BindName, arg0: entity_name0, arg1: inst33, type: type(inst16)} +// CHECK:STDOUT: inst20: {kind: PatternType, arg0: inst16, type: type(TypeType)} +// CHECK:STDOUT: inst21: {kind: BindingPattern, arg0: entity_name0, type: type(inst20)} +// CHECK:STDOUT: inst22: {kind: ValueParamPattern, arg0: inst21, arg1: call_param0, type: type(inst20)} +// CHECK:STDOUT: inst23: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst16)} +// CHECK:STDOUT: inst24: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst16)} +// CHECK:STDOUT: inst25: {kind: TupleType, arg0: inst_block7, type: type(TypeType)} +// CHECK:STDOUT: inst26: {kind: TupleLiteral, arg0: inst_block6, type: type(inst25)} +// CHECK:STDOUT: inst27: {kind: Converted, arg0: inst23, arg1: inst16, type: type(TypeType)} +// CHECK:STDOUT: inst28: {kind: Converted, arg0: inst24, arg1: inst16, type: type(TypeType)} +// CHECK:STDOUT: inst29: {kind: Converted, arg0: inst26, arg1: inst25, type: type(TypeType)} +// CHECK:STDOUT: inst30: {kind: PatternType, arg0: inst25, type: type(TypeType)} +// CHECK:STDOUT: inst31: {kind: ReturnSlotPattern, arg0: inst29, type: type(inst30)} +// CHECK:STDOUT: inst32: {kind: OutParamPattern, arg0: inst31, arg1: call_param1, type: type(inst30)} +// CHECK:STDOUT: inst33: {kind: ValueParam, arg0: call_param0, arg1: name1, type: type(inst16)} +// CHECK:STDOUT: inst34: {kind: SpliceBlock, arg0: inst_block4, arg1: inst18, type: type(TypeType)} +// CHECK:STDOUT: inst35: {kind: OutParam, arg0: call_param1, arg1: name(ReturnSlot), type: type(inst25)} +// CHECK:STDOUT: inst36: {kind: ReturnSlot, arg0: inst25, arg1: inst35, type: type(inst25)} +// CHECK:STDOUT: inst37: {kind: FunctionDecl, arg0: function0, arg1: inst_block11, type: type(inst38)} +// CHECK:STDOUT: inst38: {kind: FunctionType, arg0: function0, arg1: specific, type: type(TypeType)} +// CHECK:STDOUT: inst39: {kind: StructValue, arg0: inst_block_empty, type: type(inst38)} +// CHECK:STDOUT: inst40: {kind: PointerType, arg0: inst25, type: type(TypeType)} +// CHECK:STDOUT: inst41: {kind: NameRef, arg0: name1, arg1: inst19, type: type(inst16)} +// CHECK:STDOUT: inst42: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst16)} +// CHECK:STDOUT: inst43: {kind: TupleLiteral, arg0: inst_block13, type: type(inst25)} +// CHECK:STDOUT: inst44: {kind: TupleAccess, arg0: inst36, arg1: element0, type: type(inst16)} +// CHECK:STDOUT: inst45: {kind: TupleInit, arg0: inst_block14, arg1: inst44, type: type(inst16)} +// CHECK:STDOUT: inst46: {kind: TupleValue, arg0: inst_block_empty, type: type(inst16)} +// CHECK:STDOUT: inst47: {kind: Converted, arg0: inst41, arg1: inst45, type: type(inst16)} +// CHECK:STDOUT: inst48: {kind: TupleAccess, arg0: inst36, arg1: element1, type: type(inst16)} +// CHECK:STDOUT: inst49: {kind: TupleInit, arg0: inst_block_empty, arg1: inst48, type: type(inst16)} +// CHECK:STDOUT: inst50: {kind: Converted, arg0: inst42, arg1: inst49, type: type(inst16)} +// CHECK:STDOUT: inst51: {kind: TupleInit, arg0: inst_block15, arg1: inst36, type: type(inst25)} +// CHECK:STDOUT: inst52: {kind: TupleValue, arg0: inst_block16, type: type(inst25)} +// CHECK:STDOUT: inst53: {kind: Converted, arg0: inst43, arg1: inst51, type: type(inst25)} +// CHECK:STDOUT: inst54: {kind: ReturnExpr, arg0: inst53, arg1: inst36} // CHECK:STDOUT: constant_values: // CHECK:STDOUT: values: -// CHECK:STDOUT: inst14: concrete_constant(inst14) // CHECK:STDOUT: inst15: concrete_constant(inst15) -// CHECK:STDOUT: inst17: concrete_constant(inst15) -// CHECK:STDOUT: inst19: concrete_constant(inst19) +// CHECK:STDOUT: inst16: concrete_constant(inst16) +// CHECK:STDOUT: inst18: concrete_constant(inst16) // CHECK:STDOUT: inst20: concrete_constant(inst20) // CHECK:STDOUT: inst21: concrete_constant(inst21) -// CHECK:STDOUT: inst24: concrete_constant(inst24) -// CHECK:STDOUT: inst26: concrete_constant(inst15) -// CHECK:STDOUT: inst27: concrete_constant(inst15) -// CHECK:STDOUT: inst28: concrete_constant(inst24) -// CHECK:STDOUT: inst29: concrete_constant(inst29) +// CHECK:STDOUT: inst22: concrete_constant(inst22) +// CHECK:STDOUT: inst25: concrete_constant(inst25) +// CHECK:STDOUT: inst27: concrete_constant(inst16) +// CHECK:STDOUT: inst28: concrete_constant(inst16) +// CHECK:STDOUT: inst29: concrete_constant(inst25) // CHECK:STDOUT: inst30: concrete_constant(inst30) // CHECK:STDOUT: inst31: concrete_constant(inst31) -// CHECK:STDOUT: inst33: concrete_constant(inst15) -// CHECK:STDOUT: inst36: concrete_constant(inst38) -// CHECK:STDOUT: inst37: concrete_constant(inst37) +// CHECK:STDOUT: inst32: concrete_constant(inst32) +// CHECK:STDOUT: inst34: concrete_constant(inst16) +// CHECK:STDOUT: inst37: concrete_constant(inst39) // CHECK:STDOUT: inst38: concrete_constant(inst38) // CHECK:STDOUT: inst39: concrete_constant(inst39) -// CHECK:STDOUT: inst44: concrete_constant(inst45) -// CHECK:STDOUT: inst45: concrete_constant(inst45) -// CHECK:STDOUT: inst46: concrete_constant(inst45) -// CHECK:STDOUT: inst48: concrete_constant(inst45) -// CHECK:STDOUT: inst49: concrete_constant(inst45) -// CHECK:STDOUT: inst50: concrete_constant(inst51) -// CHECK:STDOUT: inst51: concrete_constant(inst51) -// CHECK:STDOUT: inst52: concrete_constant(inst51) +// CHECK:STDOUT: inst40: concrete_constant(inst40) +// CHECK:STDOUT: inst45: concrete_constant(inst46) +// CHECK:STDOUT: inst46: concrete_constant(inst46) +// CHECK:STDOUT: inst47: concrete_constant(inst46) +// CHECK:STDOUT: inst49: concrete_constant(inst46) +// CHECK:STDOUT: inst50: concrete_constant(inst46) +// CHECK:STDOUT: inst51: concrete_constant(inst52) +// CHECK:STDOUT: inst52: concrete_constant(inst52) +// CHECK:STDOUT: inst53: concrete_constant(inst52) // CHECK:STDOUT: symbolic_constants: {} // CHECK:STDOUT: inst_blocks: // CHECK:STDOUT: inst_block_empty: {} // CHECK:STDOUT: exports: -// CHECK:STDOUT: 0: inst36 +// CHECK:STDOUT: 0: inst37 // CHECK:STDOUT: imports: {} // CHECK:STDOUT: global_init: {} // CHECK:STDOUT: inst_block4: -// CHECK:STDOUT: 0: inst16 -// CHECK:STDOUT: 1: inst17 +// CHECK:STDOUT: 0: inst17 +// CHECK:STDOUT: 1: inst18 // CHECK:STDOUT: inst_block5: -// CHECK:STDOUT: 0: inst21 +// CHECK:STDOUT: 0: inst22 // CHECK:STDOUT: inst_block6: -// CHECK:STDOUT: 0: inst22 -// CHECK:STDOUT: 1: inst23 +// CHECK:STDOUT: 0: inst23 +// CHECK:STDOUT: 1: inst24 // CHECK:STDOUT: inst_block7: -// CHECK:STDOUT: 0: inst15 -// CHECK:STDOUT: 1: inst15 +// CHECK:STDOUT: 0: inst16 +// CHECK:STDOUT: 1: inst16 // CHECK:STDOUT: inst_block8: -// CHECK:STDOUT: 0: inst26 -// CHECK:STDOUT: 1: inst27 +// CHECK:STDOUT: 0: inst27 +// CHECK:STDOUT: 1: inst28 // CHECK:STDOUT: inst_block9: -// CHECK:STDOUT: 0: inst32 -// CHECK:STDOUT: 1: inst34 +// CHECK:STDOUT: 0: inst33 +// CHECK:STDOUT: 1: inst35 // CHECK:STDOUT: inst_block10: -// CHECK:STDOUT: 0: inst20 -// CHECK:STDOUT: 1: inst21 -// CHECK:STDOUT: 2: inst30 -// CHECK:STDOUT: 3: inst31 +// CHECK:STDOUT: 0: inst21 +// CHECK:STDOUT: 1: inst22 +// CHECK:STDOUT: 2: inst31 +// CHECK:STDOUT: 3: inst32 // CHECK:STDOUT: inst_block11: -// CHECK:STDOUT: 0: inst22 -// CHECK:STDOUT: 1: inst23 -// CHECK:STDOUT: 2: inst25 -// CHECK:STDOUT: 3: inst26 -// CHECK:STDOUT: 4: inst27 -// CHECK:STDOUT: 5: inst28 -// CHECK:STDOUT: 6: inst32 -// CHECK:STDOUT: 7: inst33 -// CHECK:STDOUT: 8: inst18 -// CHECK:STDOUT: 9: inst34 -// CHECK:STDOUT: 10: inst35 +// CHECK:STDOUT: 0: inst23 +// CHECK:STDOUT: 1: inst24 +// CHECK:STDOUT: 2: inst26 +// CHECK:STDOUT: 3: inst27 +// CHECK:STDOUT: 4: inst28 +// CHECK:STDOUT: 5: inst29 +// CHECK:STDOUT: 6: inst33 +// CHECK:STDOUT: 7: inst34 +// CHECK:STDOUT: 8: inst19 +// CHECK:STDOUT: 9: inst35 +// CHECK:STDOUT: 10: inst36 // CHECK:STDOUT: inst_block12: -// CHECK:STDOUT: 0: inst40 -// CHECK:STDOUT: 1: inst41 -// CHECK:STDOUT: 2: inst42 -// CHECK:STDOUT: 3: inst43 -// CHECK:STDOUT: 4: inst44 -// CHECK:STDOUT: 5: inst46 -// CHECK:STDOUT: 6: inst47 -// CHECK:STDOUT: 7: inst48 -// CHECK:STDOUT: 8: inst49 -// CHECK:STDOUT: 9: inst50 -// CHECK:STDOUT: 10: inst52 -// CHECK:STDOUT: 11: inst53 +// CHECK:STDOUT: 0: inst41 +// CHECK:STDOUT: 1: inst42 +// CHECK:STDOUT: 2: inst43 +// CHECK:STDOUT: 3: inst44 +// CHECK:STDOUT: 4: inst45 +// CHECK:STDOUT: 5: inst47 +// CHECK:STDOUT: 6: inst48 +// CHECK:STDOUT: 7: inst49 +// CHECK:STDOUT: 8: inst50 +// CHECK:STDOUT: 9: inst51 +// CHECK:STDOUT: 10: inst53 +// CHECK:STDOUT: 11: inst54 // CHECK:STDOUT: inst_block13: -// CHECK:STDOUT: 0: inst40 -// CHECK:STDOUT: 1: inst41 +// CHECK:STDOUT: 0: inst41 +// CHECK:STDOUT: 1: inst42 // CHECK:STDOUT: inst_block14: {} // CHECK:STDOUT: inst_block15: -// CHECK:STDOUT: 0: inst46 -// CHECK:STDOUT: 1: inst49 +// CHECK:STDOUT: 0: inst47 +// CHECK:STDOUT: 1: inst50 // CHECK:STDOUT: inst_block16: -// CHECK:STDOUT: 0: inst45 -// CHECK:STDOUT: 1: inst45 +// CHECK:STDOUT: 0: inst46 +// CHECK:STDOUT: 1: inst46 // CHECK:STDOUT: inst_block17: -// CHECK:STDOUT: 0: inst14 -// CHECK:STDOUT: 1: inst36 +// CHECK:STDOUT: 0: inst15 +// CHECK:STDOUT: 1: inst37 // CHECK:STDOUT: ... // CHECK:STDOUT: --- one_file_with_textual_ir.carbon // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/char/basics.carbon b/toolchain/check/testdata/builtins/char/basics.carbon new file mode 100644 index 000000000000..f84d308b0e68 --- /dev/null +++ b/toolchain/check/testdata/builtins/char/basics.carbon @@ -0,0 +1,133 @@ +// 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 +// +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/full.carbon +// +// AUTOUPDATE +// TIP: To test this file alone, run: +// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/builtins/char/basics.carbon +// TIP: To dump output, run: +// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/builtins/char/basics.carbon + +// --- basics.carbon + +library "[[@TEST_NAME]]"; + +//@dump-sem-ir-begin +let c: Core.Char = 'a'; +let nul: Core.Char = '\0'; +let lit: Core.CharLiteral() = '\u{1E15}'; +//@dump-sem-ir-end + +let lit_as_char: Core.Char = c; + +// --- fail_size_small.carbon + +library "[[@TEST_NAME]]"; + +// CHECK:STDERR: fail_size_small.carbon:[[@LINE+4]]:20: error: character value U+0080 too large for type `Core.Char` [CharTooLargeForType] +// CHECK:STDERR: let c: Core.Char = '\u{80}'; +// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: +let c: Core.Char = '\u{80}'; + +// --- fail_size_multi_byte.carbon + +library "[[@TEST_NAME]]"; + +// CHECK:STDERR: fail_size_multi_byte.carbon:[[@LINE+4]]:20: error: character value U+1E15 too large for type `Core.Char` [CharTooLargeForType] +// CHECK:STDERR: let c: Core.Char = '\u{1E15}'; +// CHECK:STDERR: ^~~~~~~~~~ +// CHECK:STDERR: +let c: Core.Char = '\u{1E15}'; + +// CHECK:STDOUT: --- basics.carbon +// CHECK:STDOUT: +// CHECK:STDOUT: constants { +// CHECK:STDOUT: %Char: type = class_type @Char [concrete] +// CHECK:STDOUT: %pattern_type.b09: type = pattern_type %Char [concrete] +// CHECK:STDOUT: %.54f: Core.CharLiteral = char_value U+0061 [concrete] +// CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] +// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] +// CHECK:STDOUT: %ImplicitAs.type.715: type = facet_type <@ImplicitAs, @ImplicitAs(%Char)> [concrete] +// CHECK:STDOUT: %ImplicitAs.Convert.type.f57: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Char) [concrete] +// CHECK:STDOUT: %ImplicitAs.impl_witness.b70: = impl_witness imports.%ImplicitAs.impl_witness_table.aed [concrete] +// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.715 = facet_value Core.CharLiteral, (%ImplicitAs.impl_witness.b70) [concrete] +// CHECK:STDOUT: %.a57: type = fn_type_with_self_type %ImplicitAs.Convert.type.f57, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %Core.CharLiteral.as.ImplicitAs.impl.Convert.type: type = fn_type @Core.CharLiteral.as.ImplicitAs.impl.Convert [concrete] +// CHECK:STDOUT: %Core.CharLiteral.as.ImplicitAs.impl.Convert: %Core.CharLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] +// CHECK:STDOUT: %pattern_type.8c6: type = pattern_type Core.CharLiteral [concrete] +// CHECK:STDOUT: %Core.CharLiteral.as.ImplicitAs.impl.Convert.bound.142: = bound_method %.54f, %Core.CharLiteral.as.ImplicitAs.impl.Convert [concrete] +// CHECK:STDOUT: %int_97: %Char = int_value 97 [concrete] +// CHECK:STDOUT: %.dc9: Core.CharLiteral = char_value U+0000 [concrete] +// CHECK:STDOUT: %Core.CharLiteral.as.ImplicitAs.impl.Convert.bound.f0f: = bound_method %.dc9, %Core.CharLiteral.as.ImplicitAs.impl.Convert [concrete] +// CHECK:STDOUT: %int_0: %Char = int_value 0 [concrete] +// CHECK:STDOUT: %CharLiteral.type: type = fn_type @CharLiteral [concrete] +// CHECK:STDOUT: %CharLiteral: %CharLiteral.type = struct_value () [concrete] +// CHECK:STDOUT: %.a81: Core.CharLiteral = char_value U+1E15 [concrete] +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { +// CHECK:STDOUT: .Char = %Core.Char +// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs +// CHECK:STDOUT: .CharLiteral = %Core.CharLiteral +// CHECK:STDOUT: import Core//prelude +// CHECK:STDOUT: import Core//prelude/... +// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.Char: type = import_ref Core//prelude/types/char, Char, loaded [concrete = constants.%Char] +// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.0f8: %Core.CharLiteral.as.ImplicitAs.impl.Convert.type = import_ref Core//prelude/types/char, loc18_36, loaded [concrete = constants.%Core.CharLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.aed = impl_witness_table (%Core.import_ref.0f8), @Core.CharLiteral.as.ImplicitAs.impl [concrete] +// CHECK:STDOUT: %Core.CharLiteral: %CharLiteral.type = import_ref Core//prelude/types/char, CharLiteral, loaded [concrete = constants.%CharLiteral] +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: file { +// CHECK:STDOUT: name_binding_decl { +// CHECK:STDOUT: %c.patt: %pattern_type.b09 = binding_pattern c [concrete] +// CHECK:STDOUT: } +// CHECK:STDOUT: %.loc5_12: type = splice_block %Char.ref.loc5 [concrete = constants.%Char] { +// CHECK:STDOUT: %Core.ref.loc5: = name_ref Core, imports.%Core [concrete = imports.%Core] +// CHECK:STDOUT: %Char.ref.loc5: type = name_ref Char, imports.%Core.Char [concrete = constants.%Char] +// CHECK:STDOUT: } +// CHECK:STDOUT: %impl.elem0.loc5: %.a57 = impl_witness_access constants.%ImplicitAs.impl_witness.b70, element0 [concrete = constants.%Core.CharLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %bound_method.loc5: = bound_method @__global_init.%.loc5, %impl.elem0.loc5 [concrete = constants.%Core.CharLiteral.as.ImplicitAs.impl.Convert.bound.142] +// CHECK:STDOUT: %Core.CharLiteral.as.ImplicitAs.impl.Convert.call.loc5: init %Char = call %bound_method.loc5(@__global_init.%.loc5) [concrete = constants.%int_97] +// CHECK:STDOUT: %.loc5_20.1: %Char = value_of_initializer %Core.CharLiteral.as.ImplicitAs.impl.Convert.call.loc5 [concrete = constants.%int_97] +// CHECK:STDOUT: %.loc5_20.2: %Char = converted @__global_init.%.loc5, %.loc5_20.1 [concrete = constants.%int_97] +// CHECK:STDOUT: %c: %Char = bind_name c, %.loc5_20.2 +// CHECK:STDOUT: name_binding_decl { +// CHECK:STDOUT: %nul.patt: %pattern_type.b09 = binding_pattern nul [concrete] +// CHECK:STDOUT: } +// CHECK:STDOUT: %.loc6_14: type = splice_block %Char.ref.loc6 [concrete = constants.%Char] { +// CHECK:STDOUT: %Core.ref.loc6: = name_ref Core, imports.%Core [concrete = imports.%Core] +// CHECK:STDOUT: %Char.ref.loc6: type = name_ref Char, imports.%Core.Char [concrete = constants.%Char] +// CHECK:STDOUT: } +// CHECK:STDOUT: %impl.elem0.loc6: %.a57 = impl_witness_access constants.%ImplicitAs.impl_witness.b70, element0 [concrete = constants.%Core.CharLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %bound_method.loc6: = bound_method @__global_init.%.loc6, %impl.elem0.loc6 [concrete = constants.%Core.CharLiteral.as.ImplicitAs.impl.Convert.bound.f0f] +// CHECK:STDOUT: %Core.CharLiteral.as.ImplicitAs.impl.Convert.call.loc6: init %Char = call %bound_method.loc6(@__global_init.%.loc6) [concrete = constants.%int_0] +// CHECK:STDOUT: %.loc6_22.1: %Char = value_of_initializer %Core.CharLiteral.as.ImplicitAs.impl.Convert.call.loc6 [concrete = constants.%int_0] +// CHECK:STDOUT: %.loc6_22.2: %Char = converted @__global_init.%.loc6, %.loc6_22.1 [concrete = constants.%int_0] +// CHECK:STDOUT: %nul: %Char = bind_name nul, %.loc6_22.2 +// CHECK:STDOUT: name_binding_decl { +// CHECK:STDOUT: %lit.patt: %pattern_type.8c6 = binding_pattern lit [concrete] +// CHECK:STDOUT: } +// CHECK:STDOUT: %.loc7_27.1: type = splice_block %.loc7_27.3 [concrete = Core.CharLiteral] { +// CHECK:STDOUT: %Core.ref.loc7: = name_ref Core, imports.%Core [concrete = imports.%Core] +// CHECK:STDOUT: %CharLiteral.ref: %CharLiteral.type = name_ref CharLiteral, imports.%Core.CharLiteral [concrete = constants.%CharLiteral] +// CHECK:STDOUT: %CharLiteral.call: init type = call %CharLiteral.ref() [concrete = Core.CharLiteral] +// CHECK:STDOUT: %.loc7_27.2: type = value_of_initializer %CharLiteral.call [concrete = Core.CharLiteral] +// CHECK:STDOUT: %.loc7_27.3: type = converted %CharLiteral.call, %.loc7_27.2 [concrete = Core.CharLiteral] +// CHECK:STDOUT: } +// CHECK:STDOUT: %lit: Core.CharLiteral = bind_name lit, @__global_init.%.loc7 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: fn @__global_init() { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: %.loc5: Core.CharLiteral = char_value U+0061 [concrete = constants.%.54f] +// CHECK:STDOUT: %.loc6: Core.CharLiteral = char_value U+0000 [concrete = constants.%.dc9] +// CHECK:STDOUT: %.loc7: Core.CharLiteral = char_value U+1E15 [concrete = constants.%.a81] +// CHECK:STDOUT: +// CHECK:STDOUT: } +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/cross_package_import.carbon b/toolchain/check/testdata/class/cross_package_import.carbon index d13ea6ad7e42..9e0c351e0d47 100644 --- a/toolchain/check/testdata/class/cross_package_import.carbon +++ b/toolchain/check/testdata/class/cross_package_import.carbon @@ -240,7 +240,7 @@ var c: Other.C = {}; // CHECK:STDOUT: } // CHECK:STDOUT: %Other.C: type = import_ref Other//other_define, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Other.import_ref.8f2: = import_ref Other//other_define, loc4_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Other.import_ref.2c4 = import_ref Other//other_define, inst18 [no loc], unloaded +// CHECK:STDOUT: %Other.import_ref.2c4 = import_ref Other//other_define, inst19 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -349,7 +349,7 @@ var c: Other.C = {}; // CHECK:STDOUT: } // CHECK:STDOUT: %Other.C: type = import_ref Other//other_define, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Other.import_ref.8f2: = import_ref Other//other_define, loc4_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Other.import_ref.2c4 = import_ref Other//other_define, inst18 [no loc], unloaded +// CHECK:STDOUT: %Other.import_ref.2c4 = import_ref Other//other_define, inst19 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -410,7 +410,7 @@ var c: Other.C = {}; // CHECK:STDOUT: } // CHECK:STDOUT: %Other.C: type = import_ref Other//other_define, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Other.import_ref.8f2: = import_ref Other//other_define, loc4_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Other.import_ref.2c4 = import_ref Other//other_define, inst18 [no loc], unloaded +// CHECK:STDOUT: %Other.import_ref.2c4 = import_ref Other//other_define, inst19 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/class/destroy_calls.carbon b/toolchain/check/testdata/class/destroy_calls.carbon index 39dd5723451f..5a48f77fd806 100644 --- a/toolchain/check/testdata/class/destroy_calls.carbon +++ b/toolchain/check/testdata/class/destroy_calls.carbon @@ -379,27 +379,27 @@ fn G() { F({}); } // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//types, loc7_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.f42 = import_ref Main//types, inst18 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.f42 = import_ref Main//types, inst19 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.b5b = import_ref Main//types, loc5_22, unloaded // CHECK:STDOUT: %Main.import_ref.1ed = import_ref Main//types, loc6_27, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//types, loc12_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.ee7 = import_ref Main//types, inst80 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.ee7 = import_ref Main//types, inst81 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.b14 = import_ref Main//types, loc10_30, unloaded // CHECK:STDOUT: %Main.import_ref.f79 = import_ref Main//types, loc11_33, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.3: = import_ref Main//types, loc17_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.95d = import_ref Main//types, inst124 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.95d = import_ref Main//types, inst125 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.1cb = import_ref Main//types, loc15_24, unloaded // CHECK:STDOUT: %Main.import_ref.675 = import_ref Main//types, loc16_33, unloaded // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.15b: = import_ref Main//types, loc4_14, loaded [concrete = constants.%Destroy.impl_witness.17d] -// CHECK:STDOUT: %Main.import_ref.09f: type = import_ref Main//types, inst18 [no loc], loaded [concrete = constants.%NoAddr] -// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//types, inst39 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.09f: type = import_ref Main//types, inst19 [no loc], loaded [concrete = constants.%NoAddr] +// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//types, inst40 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.022: = import_ref Main//types, loc9_22, loaded [concrete = constants.%Destroy.impl_witness.f3a] -// CHECK:STDOUT: %Main.import_ref.2e8: type = import_ref Main//types, inst80 [no loc], loaded [concrete = constants.%ExplicitReturn] -// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//types, inst39 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.2e8: type = import_ref Main//types, inst81 [no loc], loaded [concrete = constants.%ExplicitReturn] +// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//types, inst40 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.d7d: = import_ref Main//types, loc14_16, loaded [concrete = constants.%Destroy.impl_witness.91f] -// CHECK:STDOUT: %Main.import_ref.0a2: type = import_ref Main//types, inst124 [no loc], loaded [concrete = constants.%WithAddr] -// CHECK:STDOUT: %Main.import_ref.cb9298.3: type = import_ref Main//types, inst39 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.0a2: type = import_ref Main//types, inst125 [no loc], loaded [concrete = constants.%WithAddr] +// CHECK:STDOUT: %Main.import_ref.cb9298.3: type = import_ref Main//types, inst40 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.344: %WithAddr.as.Destroy.impl.Op.type = import_ref Main//types, loc14_16, loaded [concrete = constants.%WithAddr.as.Destroy.impl.Op] // CHECK:STDOUT: %Destroy.impl_witness_table.4f4 = impl_witness_table (%Main.import_ref.344), @WithAddr.as.Destroy.impl [concrete] // CHECK:STDOUT: %Main.import_ref.d37: %ExplicitReturn.as.Destroy.impl.Op.type = import_ref Main//types, loc9_22, loaded [concrete = constants.%ExplicitReturn.as.Destroy.impl.Op] @@ -544,27 +544,27 @@ fn G() { F({}); } // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//types, loc7_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.f42 = import_ref Main//types, inst18 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.f42 = import_ref Main//types, inst19 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.b5b = import_ref Main//types, loc5_22, unloaded // CHECK:STDOUT: %Main.import_ref.1ed = import_ref Main//types, loc6_27, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//types, loc12_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.ee7 = import_ref Main//types, inst80 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.ee7 = import_ref Main//types, inst81 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.b14 = import_ref Main//types, loc10_30, unloaded // CHECK:STDOUT: %Main.import_ref.f79 = import_ref Main//types, loc11_33, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.3: = import_ref Main//types, loc17_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.95d = import_ref Main//types, inst124 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.95d = import_ref Main//types, inst125 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.1cb = import_ref Main//types, loc15_24, unloaded // CHECK:STDOUT: %Main.import_ref.675 = import_ref Main//types, loc16_33, unloaded // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.15b: = import_ref Main//types, loc4_14, loaded [concrete = constants.%Destroy.impl_witness.17d] -// CHECK:STDOUT: %Main.import_ref.09f: type = import_ref Main//types, inst18 [no loc], loaded [concrete = constants.%NoAddr] -// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//types, inst39 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.09f: type = import_ref Main//types, inst19 [no loc], loaded [concrete = constants.%NoAddr] +// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//types, inst40 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.022: = import_ref Main//types, loc9_22, loaded [concrete = constants.%Destroy.impl_witness.f3a] -// CHECK:STDOUT: %Main.import_ref.2e8: type = import_ref Main//types, inst80 [no loc], loaded [concrete = constants.%ExplicitReturn] -// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//types, inst39 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.2e8: type = import_ref Main//types, inst81 [no loc], loaded [concrete = constants.%ExplicitReturn] +// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//types, inst40 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.d7d: = import_ref Main//types, loc14_16, loaded [concrete = constants.%Destroy.impl_witness.91f] -// CHECK:STDOUT: %Main.import_ref.0a2: type = import_ref Main//types, inst124 [no loc], loaded [concrete = constants.%WithAddr] -// CHECK:STDOUT: %Main.import_ref.cb9298.3: type = import_ref Main//types, inst39 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.0a2: type = import_ref Main//types, inst125 [no loc], loaded [concrete = constants.%WithAddr] +// CHECK:STDOUT: %Main.import_ref.cb9298.3: type = import_ref Main//types, inst40 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.b27: %NoAddr.as.Destroy.impl.Op.type = import_ref Main//types, loc4_14, loaded [concrete = constants.%NoAddr.as.Destroy.impl.Op] // CHECK:STDOUT: %Destroy.impl_witness_table.b7c = impl_witness_table (%Main.import_ref.b27), @NoAddr.as.Destroy.impl [concrete] // CHECK:STDOUT: %Main.import_ref.344: %WithAddr.as.Destroy.impl.Op.type = import_ref Main//types, loc14_16, loaded [concrete = constants.%WithAddr.as.Destroy.impl.Op] @@ -728,27 +728,27 @@ fn G() { F({}); } // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//types, loc7_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.f42 = import_ref Main//types, inst18 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.f42 = import_ref Main//types, inst19 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.784: %NoAddr.Make.type = import_ref Main//types, loc5_22, loaded [concrete = constants.%NoAddr.Make] // CHECK:STDOUT: %Main.import_ref.1ed = import_ref Main//types, loc6_27, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//types, loc12_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.ee7 = import_ref Main//types, inst80 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.ee7 = import_ref Main//types, inst81 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.8e0: %ExplicitReturn.Make.type = import_ref Main//types, loc10_30, loaded [concrete = constants.%ExplicitReturn.Make] // CHECK:STDOUT: %Main.import_ref.f79 = import_ref Main//types, loc11_33, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.3: = import_ref Main//types, loc17_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.95d = import_ref Main//types, inst124 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.95d = import_ref Main//types, inst125 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.974: %WithAddr.Make.type = import_ref Main//types, loc15_24, loaded [concrete = constants.%WithAddr.Make] // CHECK:STDOUT: %Main.import_ref.675 = import_ref Main//types, loc16_33, unloaded // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.15b: = import_ref Main//types, loc4_14, loaded [concrete = constants.%Destroy.impl_witness.17d] -// CHECK:STDOUT: %Main.import_ref.09f: type = import_ref Main//types, inst18 [no loc], loaded [concrete = constants.%NoAddr] -// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//types, inst39 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.09f: type = import_ref Main//types, inst19 [no loc], loaded [concrete = constants.%NoAddr] +// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//types, inst40 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.022: = import_ref Main//types, loc9_22, loaded [concrete = constants.%Destroy.impl_witness.f3a] -// CHECK:STDOUT: %Main.import_ref.2e8: type = import_ref Main//types, inst80 [no loc], loaded [concrete = constants.%ExplicitReturn] -// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//types, inst39 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.2e8: type = import_ref Main//types, inst81 [no loc], loaded [concrete = constants.%ExplicitReturn] +// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//types, inst40 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.d7d: = import_ref Main//types, loc14_16, loaded [concrete = constants.%Destroy.impl_witness.91f] -// CHECK:STDOUT: %Main.import_ref.0a2: type = import_ref Main//types, inst124 [no loc], loaded [concrete = constants.%WithAddr] -// CHECK:STDOUT: %Main.import_ref.cb9298.3: type = import_ref Main//types, inst39 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.0a2: type = import_ref Main//types, inst125 [no loc], loaded [concrete = constants.%WithAddr] +// CHECK:STDOUT: %Main.import_ref.cb9298.3: type = import_ref Main//types, inst40 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.344: %WithAddr.as.Destroy.impl.Op.type = import_ref Main//types, loc14_16, loaded [concrete = constants.%WithAddr.as.Destroy.impl.Op] // CHECK:STDOUT: %Destroy.impl_witness_table.4f4 = impl_witness_table (%Main.import_ref.344), @WithAddr.as.Destroy.impl [concrete] // CHECK:STDOUT: %Main.import_ref.d37: %ExplicitReturn.as.Destroy.impl.Op.type = import_ref Main//types, loc9_22, loaded [concrete = constants.%ExplicitReturn.as.Destroy.impl.Op] diff --git a/toolchain/check/testdata/class/export_name.carbon b/toolchain/check/testdata/class/export_name.carbon index 6b05f4c8bfd3..db90f1682a99 100644 --- a/toolchain/check/testdata/class/export_name.carbon +++ b/toolchain/check/testdata/class/export_name.carbon @@ -77,7 +77,7 @@ var c: C = {}; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: type = import_ref Main//base, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//base, loc4_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst17 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -107,8 +107,8 @@ var c: C = {}; // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: type = import_ref Main//export, C, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.8db: = import_ref Main//export, inst21 [indirect], loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//export, inst22 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.8db: = import_ref Main//export, inst22 [indirect], loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//export, inst23 [indirect], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/class/extern.carbon b/toolchain/check/testdata/class/extern.carbon index 6c43f5397773..a7a59b8dc130 100644 --- a/toolchain/check/testdata/class/extern.carbon +++ b/toolchain/check/testdata/class/extern.carbon @@ -614,7 +614,7 @@ extern class C; // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//def, loc4_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//def, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//def, inst17 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -642,7 +642,7 @@ extern class C; // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//def, loc4_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//def, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//def, inst17 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/class/fail_abstract_in_struct.carbon b/toolchain/check/testdata/class/fail_abstract_in_struct.carbon index c7586e72aec8..66cf79d2ffc5 100644 --- a/toolchain/check/testdata/class/fail_abstract_in_struct.carbon +++ b/toolchain/check/testdata/class/fail_abstract_in_struct.carbon @@ -409,7 +409,7 @@ var v5: {.m: Abstract}; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.Abstract: type = import_ref Main//lib, Abstract, loaded [concrete = constants.%Abstract] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//lib, loc3_26, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.ee1 = import_ref Main//lib, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.ee1 = import_ref Main//lib, inst17 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/class/fail_abstract_in_tuple.carbon b/toolchain/check/testdata/class/fail_abstract_in_tuple.carbon index 2c17d0d63eac..322add919e55 100644 --- a/toolchain/check/testdata/class/fail_abstract_in_tuple.carbon +++ b/toolchain/check/testdata/class/fail_abstract_in_tuple.carbon @@ -795,7 +795,7 @@ fn Var5() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//lib, loc3_26, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.ee1 = import_ref Main//lib, inst18 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.ee1 = import_ref Main//lib, inst19 [no loc], unloaded // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/adapt.carbon b/toolchain/check/testdata/class/generic/adapt.carbon index 41be96862d21..dfead3485f78 100644 --- a/toolchain/check/testdata/class/generic/adapt.carbon +++ b/toolchain/check/testdata/class/generic/adapt.carbon @@ -389,10 +389,10 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.5ab: type = import_ref Main//adapt_specific_type, loc4_9, loaded [symbolic = @C.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.b5f: = import_ref Main//adapt_specific_type, loc6_1, loaded [symbolic = @C.%complete_type (constants.%complete_type.433)] -// CHECK:STDOUT: %Main.import_ref.4c0 = import_ref Main//adapt_specific_type, inst26 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.4c0 = import_ref Main//adapt_specific_type, inst27 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.262: @C.%C.elem (%C.elem.66c) = import_ref Main//adapt_specific_type, loc5_8, loaded [concrete = %.22b] // CHECK:STDOUT: %Main.import_ref.709: = import_ref Main//adapt_specific_type, loc10_1, loaded [concrete = constants.%complete_type.c07] -// CHECK:STDOUT: %Main.import_ref.feb = import_ref Main//adapt_specific_type, inst90 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.feb = import_ref Main//adapt_specific_type, inst91 [no loc], unloaded // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %.22b: @C.%C.elem (%C.elem.66c) = field_decl x, element0 [concrete] // CHECK:STDOUT: } @@ -941,24 +941,24 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//extend_adapt_specific_type_library, loc7_9, loaded [symbolic = @C.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.b5f: = import_ref Main//extend_adapt_specific_type_library, loc9_1, loaded [symbolic = @C.%complete_type (constants.%complete_type.433)] -// CHECK:STDOUT: %Main.import_ref.4c0 = import_ref Main//extend_adapt_specific_type_library, inst26 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.4c0 = import_ref Main//extend_adapt_specific_type_library, inst27 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.262: @C.%C.elem (%C.elem.66c) = import_ref Main//extend_adapt_specific_type_library, loc8_8, loaded [concrete = %.22b] // CHECK:STDOUT: %Main.import_ref.709: = import_ref Main//extend_adapt_specific_type_library, loc13_1, loaded [concrete = constants.%complete_type.c07] -// CHECK:STDOUT: %Main.import_ref.feb = import_ref Main//extend_adapt_specific_type_library, inst90 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.feb = import_ref Main//extend_adapt_specific_type_library, inst91 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.19d12e.2: type = import_ref Main//extend_adapt_specific_type_library, loc12_21, loaded [concrete = constants.%C.239] // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %.22b: @C.%C.elem (%C.elem.66c) = field_decl x, element0 [concrete] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Main.import_ref.21a = import_ref Main//extend_adapt_specific_type_library, loc7_19, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//extend_adapt_specific_type_library, loc7_9, loaded [symbolic = @C.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.499: type = import_ref Main//extend_adapt_specific_type_library, inst26 [no loc], loaded [symbolic = constants.%C.f2e] -// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//extend_adapt_specific_type_library, inst37 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.499: type = import_ref Main//extend_adapt_specific_type_library, inst27 [no loc], loaded [symbolic = constants.%C.f2e] +// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//extend_adapt_specific_type_library, inst38 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.251 = import_ref Main//extend_adapt_specific_type_library, loc7_19, unloaded // CHECK:STDOUT: %Destroy.impl_witness_table.00b = impl_witness_table (%Main.import_ref.251), @C.as.Destroy.impl [concrete] // CHECK:STDOUT: %Main.import_ref.5ab3ec.3: type = import_ref Main//extend_adapt_specific_type_library, loc7_9, loaded [symbolic = @C.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.07a = import_ref Main//extend_adapt_specific_type_library, loc11_15, unloaded -// CHECK:STDOUT: %Main.import_ref.b65: type = import_ref Main//extend_adapt_specific_type_library, inst90 [no loc], loaded [concrete = constants.%Adapter] -// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//extend_adapt_specific_type_library, inst37 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.b65: type = import_ref Main//extend_adapt_specific_type_library, inst91 [no loc], loaded [concrete = constants.%Adapter] +// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//extend_adapt_specific_type_library, inst38 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1299,7 +1299,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.5ab: type = import_ref Main//adapt_generic_type, loc4_15, loaded [symbolic = @Adapter.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.fb3: = import_ref Main//adapt_generic_type, loc6_1, loaded [symbolic = @Adapter.%complete_type (constants.%complete_type.f87)] -// CHECK:STDOUT: %Main.import_ref.9a3 = import_ref Main//adapt_generic_type, inst26 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.9a3 = import_ref Main//adapt_generic_type, inst27 [no loc], unloaded // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // 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 6ffa09471ecf..65adb6695d7d 100644 --- a/toolchain/check/testdata/class/generic/base_is_generic.carbon +++ b/toolchain/check/testdata/class/generic/base_is_generic.carbon @@ -403,14 +403,14 @@ fn H() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.e8d: = import_ref Main//extend_generic_base, loc10_1, loaded [concrete = constants.%complete_type.09d] -// CHECK:STDOUT: %Main.import_ref.446 = import_ref Main//extend_generic_base, inst90 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.446 = import_ref Main//extend_generic_base, inst91 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.a92: %Param.elem = import_ref Main//extend_generic_base, loc9_8, loaded [concrete = %.be7] // CHECK:STDOUT: %Main.import_ref.5ab: type = import_ref Main//extend_generic_base, loc4_17, loaded [symbolic = @Base.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.b5f: = import_ref Main//extend_generic_base, loc6_1, loaded [symbolic = @Base.%complete_type (constants.%complete_type.433)] -// CHECK:STDOUT: %Main.import_ref.8e0 = import_ref Main//extend_generic_base, inst26 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.8e0 = import_ref Main//extend_generic_base, inst27 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.7f7: @Base.%Base.elem (%Base.elem.9af) = import_ref Main//extend_generic_base, loc5_8, loaded [concrete = %.e66] // CHECK:STDOUT: %Main.import_ref.bd0: = import_ref Main//extend_generic_base, loc14_1, loaded [concrete = constants.%complete_type.b07] -// CHECK:STDOUT: %Main.import_ref.f6c = import_ref Main//extend_generic_base, inst140 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.f6c = import_ref Main//extend_generic_base, inst141 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.d24 = import_ref Main//extend_generic_base, loc13_27, unloaded // CHECK:STDOUT: %Main.import_ref.77a301.2: type = import_ref Main//extend_generic_base, loc13_26, loaded [concrete = constants.%Base.7a8] // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] @@ -1114,11 +1114,11 @@ fn H() { // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//extend_generic_symbolic_base, loc4_14, loaded [symbolic = @X.%U (constants.%U)] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//extend_generic_symbolic_base, loc6_1, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %Main.import_ref.e8e = import_ref Main//extend_generic_symbolic_base, inst26 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.e8e = import_ref Main//extend_generic_symbolic_base, inst27 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.b8a: @X.%X.G.type (%X.G.type.56f312.1) = import_ref Main//extend_generic_symbolic_base, loc5_15, loaded [symbolic = @X.%X.G (constants.%X.G.b504c4.1)] // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//extend_generic_symbolic_base, loc8_9, loaded [symbolic = @C.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.93f: = import_ref Main//extend_generic_symbolic_base, loc10_1, loaded [symbolic = @C.%complete_type (constants.%complete_type.768)] -// CHECK:STDOUT: %Main.import_ref.4c0 = import_ref Main//extend_generic_symbolic_base, inst114 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.4c0 = import_ref Main//extend_generic_symbolic_base, inst115 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.65d = import_ref Main//extend_generic_symbolic_base, loc9_20, unloaded // CHECK:STDOUT: %Main.import_ref.561eb2.2: type = import_ref Main//extend_generic_symbolic_base, loc9_19, loaded [symbolic = @C.%X (constants.%X.75b6d8.2)] // CHECK:STDOUT: %Main.import_ref.5ab3ec.3: type = import_ref Main//extend_generic_symbolic_base, loc4_14, loaded [symbolic = @X.%U (constants.%U)] diff --git a/toolchain/check/testdata/class/generic/import.carbon b/toolchain/check/testdata/class/generic/import.carbon index 158a4290f98e..5754fe61a7f6 100644 --- a/toolchain/check/testdata/class/generic/import.carbon +++ b/toolchain/check/testdata/class/generic/import.carbon @@ -393,18 +393,18 @@ class Class(U:! type) { // CHECK:STDOUT: %Main.import_ref.b22 = import_ref Main//foo, loc6_31, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.eb1: = import_ref Main//foo, loc9_1, loaded [concrete = constants.%complete_type.a68] -// CHECK:STDOUT: %Main.import_ref.3c0 = import_ref Main//foo, inst33 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.3c0 = import_ref Main//foo, inst34 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.051 = import_ref Main//foo, loc7_8, unloaded // CHECK:STDOUT: %Main.import_ref.570 = import_ref Main//foo, loc8_17, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.722: type = import_ref Main//foo, inst33 [no loc], loaded [symbolic = constants.%CompleteClass.f97] -// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//foo, inst78 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.722: type = import_ref Main//foo, inst34 [no loc], loaded [symbolic = constants.%CompleteClass.f97] +// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//foo, inst79 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.894484.1 = import_ref Main//foo, loc6_31, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.3: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.894484.2 = import_ref Main//foo, loc6_31, unloaded // CHECK:STDOUT: %Destroy.impl_witness_table.cce = impl_witness_table (%Main.import_ref.894484.2), @CompleteClass.as.Destroy.impl [concrete] // CHECK:STDOUT: %Main.import_ref.5ab3ec.4: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.773: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.9a6) = import_ref Main//foo, inst213 [indirect], loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.458)] +// CHECK:STDOUT: %Main.import_ref.773: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.9a6) = import_ref Main//foo, inst214 [indirect], loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.458)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.1ad = impl_witness_table (%Main.import_ref.773), @Core.IntLiteral.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: %Main.import_ref.5ab3ec.5: type = import_ref Main//foo, loc4_13, loaded [symbolic = @Class.%T.1 (constants.%T)] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] @@ -680,15 +680,15 @@ class Class(U:! type) { // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.eb1: = import_ref Main//foo, loc9_1, loaded [concrete = constants.%complete_type.54b] -// CHECK:STDOUT: %Main.import_ref.3c0 = import_ref Main//foo, inst33 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.3c0 = import_ref Main//foo, inst34 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.e76: @CompleteClass.%CompleteClass.elem (%CompleteClass.elem.28a) = import_ref Main//foo, loc7_8, loaded [concrete = %.364] // CHECK:STDOUT: %Main.import_ref.a52: @CompleteClass.%CompleteClass.F.type (%CompleteClass.F.type.14f) = import_ref Main//foo, loc8_17, loaded [symbolic = @CompleteClass.%CompleteClass.F (constants.%CompleteClass.F.874)] // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.b22 = import_ref Main//foo, loc6_31, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.3: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.722: type = import_ref Main//foo, inst33 [no loc], loaded [symbolic = constants.%CompleteClass.f97] -// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//foo, inst78 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.722: type = import_ref Main//foo, inst34 [no loc], loaded [symbolic = constants.%CompleteClass.f97] +// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//foo, inst79 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.894 = import_ref Main//foo, loc6_31, unloaded // CHECK:STDOUT: %Destroy.impl_witness_table.f4c = impl_witness_table (%Main.import_ref.894), @CompleteClass.as.Destroy.impl [concrete] // CHECK:STDOUT: %Main.import_ref.5ab3ec.4: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] @@ -958,7 +958,7 @@ class Class(U:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.eb1: = import_ref Main//foo, loc9_1, loaded [concrete = constants.%complete_type.a68] -// CHECK:STDOUT: %Main.import_ref.3c0 = import_ref Main//foo, inst33 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.3c0 = import_ref Main//foo, inst34 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.051 = import_ref Main//foo, loc7_8, unloaded // CHECK:STDOUT: %Main.import_ref.570 = import_ref Main//foo, loc8_17, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] @@ -966,8 +966,8 @@ class Class(U:! type) { // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Main.import_ref.b22 = import_ref Main//foo, loc6_31, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.3: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.722: type = import_ref Main//foo, inst33 [no loc], loaded [symbolic = constants.%CompleteClass.f97] -// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//foo, inst78 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.722: type = import_ref Main//foo, inst34 [no loc], loaded [symbolic = constants.%CompleteClass.f97] +// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//foo, inst79 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.894 = import_ref Main//foo, loc6_31, unloaded // CHECK:STDOUT: %Destroy.impl_witness_table.cce = impl_witness_table (%Main.import_ref.894), @CompleteClass.as.Destroy.impl [concrete] // CHECK:STDOUT: %Main.import_ref.5ab3ec.4: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] @@ -1171,12 +1171,12 @@ class Class(U:! type) { // CHECK:STDOUT: %Main.import_ref.b22 = import_ref Main//foo, loc6_31, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.eb1: = import_ref Main//foo, loc9_1, loaded [concrete = constants.%complete_type.a68] -// CHECK:STDOUT: %Main.import_ref.3c0 = import_ref Main//foo, inst33 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.3c0 = import_ref Main//foo, inst34 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.051 = import_ref Main//foo, loc7_8, unloaded // CHECK:STDOUT: %Main.import_ref.570 = import_ref Main//foo, loc8_17, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.722: type = import_ref Main//foo, inst33 [no loc], loaded [symbolic = constants.%CompleteClass] -// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//foo, inst78 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.722: type = import_ref Main//foo, inst34 [no loc], loaded [symbolic = constants.%CompleteClass] +// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//foo, inst79 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.894484.1 = import_ref Main//foo, loc6_31, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.3: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.894484.2 = import_ref Main//foo, loc6_31, unloaded diff --git a/toolchain/check/testdata/class/implicit_import.carbon b/toolchain/check/testdata/class/implicit_import.carbon index ec81992fc9ae..d6eaa69d625d 100644 --- a/toolchain/check/testdata/class/implicit_import.carbon +++ b/toolchain/check/testdata/class/implicit_import.carbon @@ -163,7 +163,7 @@ class B {} // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//redecl_after_def, loc4_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//redecl_after_def, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//redecl_after_def, inst17 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -218,7 +218,7 @@ class B {} // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: type = import_ref Main//redef_after_def, C, loaded [concrete = constants.%C.f794a0.1] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//redef_after_def, loc4_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//redef_after_def, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//redef_after_def, inst17 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/class/import.carbon b/toolchain/check/testdata/class/import.carbon index ee5772daa6ea..9a451b5c6f00 100644 --- a/toolchain/check/testdata/class/import.carbon +++ b/toolchain/check/testdata/class/import.carbon @@ -329,32 +329,32 @@ fn Run() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//a, loc5_1, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %Main.import_ref.fd7 = import_ref Main//a, inst18 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.fd7 = import_ref Main//a, inst19 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.709: = import_ref Main//a, loc9_1, loaded [concrete = constants.%complete_type.c07] -// CHECK:STDOUT: %Main.import_ref.845 = import_ref Main//a, inst63 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.845 = import_ref Main//a, inst64 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.4d2: %Field.elem = import_ref Main//a, loc8_8, loaded [concrete = %.d33] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.a86c: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.0b2) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6d7)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.e36 = impl_witness_table (%Core.import_ref.a86c), @Core.IntLiteral.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: %.d33: %Field.elem = field_decl x, element0 [concrete] // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//a, loc16_1, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %Main.import_ref.39e731.1 = import_ref Main//a, inst113 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.39e731.1 = import_ref Main//a, inst114 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.760: %ForwardDeclared.F.type = import_ref Main//a, loc14_21, loaded [concrete = constants.%ForwardDeclared.F] // CHECK:STDOUT: %Main.import_ref.26e: %ForwardDeclared.G.type = import_ref Main//a, loc15_27, loaded [concrete = constants.%ForwardDeclared.G] // CHECK:STDOUT: %Main.import_ref.8f24d3.3: = import_ref Main//a, loc16_1, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %Main.import_ref.39e731.2 = import_ref Main//a, inst113 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.39e731.2 = import_ref Main//a, inst114 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.42a = import_ref Main//a, loc14_21, unloaded // CHECK:STDOUT: %Main.import_ref.67a = import_ref Main//a, loc15_27, unloaded // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.9a0: = import_ref Main//a, loc4_13, loaded [concrete = constants.%Destroy.impl_witness.b5a] -// CHECK:STDOUT: %Main.import_ref.db3: type = import_ref Main//a, inst18 [no loc], loaded [concrete = constants.%Empty] -// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//a, inst21 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.db3: type = import_ref Main//a, inst19 [no loc], loaded [concrete = constants.%Empty] +// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//a, inst22 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.d40: = import_ref Main//a, loc7_13, loaded [concrete = constants.%Destroy.impl_witness.7bf] -// CHECK:STDOUT: %Main.import_ref.923: type = import_ref Main//a, inst63 [no loc], loaded [concrete = constants.%Field] -// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//a, inst21 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.923: type = import_ref Main//a, inst64 [no loc], loaded [concrete = constants.%Field] +// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//a, inst22 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.8eb: = import_ref Main//a, loc13_23, loaded [concrete = constants.%Destroy.impl_witness.c7e] -// CHECK:STDOUT: %Main.import_ref.e73: type = import_ref Main//a, inst113 [no loc], loaded [concrete = constants.%ForwardDeclared.7b34f2.1] -// CHECK:STDOUT: %Main.import_ref.cb9298.3: type = import_ref Main//a, inst21 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.e73: type = import_ref Main//a, inst114 [no loc], loaded [concrete = constants.%ForwardDeclared.7b34f2.1] +// CHECK:STDOUT: %Main.import_ref.cb9298.3: type = import_ref Main//a, inst22 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.dd3: %ForwardDeclared.as.Destroy.impl.Op.type = import_ref Main//a, loc13_23, loaded [concrete = constants.%ForwardDeclared.as.Destroy.impl.Op] // CHECK:STDOUT: %Destroy.impl_witness_table.e4f = impl_witness_table (%Main.import_ref.dd3), @ForwardDeclared.as.Destroy.impl [concrete] // CHECK:STDOUT: %Main.import_ref.006: %Field.as.Destroy.impl.Op.type = import_ref Main//a, loc7_13, loaded [concrete = constants.%Field.as.Destroy.impl.Op] diff --git a/toolchain/check/testdata/class/import_access.carbon b/toolchain/check/testdata/class/import_access.carbon index ee47ef6aa791..7b141805951b 100644 --- a/toolchain/check/testdata/class/import_access.carbon +++ b/toolchain/check/testdata/class/import_access.carbon @@ -217,7 +217,7 @@ private class Redecl {} // CHECK:STDOUT: imports { // CHECK:STDOUT: %Test.Def: type = import_ref Test//def, Def, loaded [concrete = constants.%Def] // CHECK:STDOUT: %Test.import_ref.8f2: = import_ref Test//def, loc4_20, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Test.import_ref.4ce = import_ref Test//def, inst16 [no loc], unloaded +// CHECK:STDOUT: %Test.import_ref.4ce = import_ref Test//def, inst17 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -331,7 +331,7 @@ private class Redecl {} // CHECK:STDOUT: imports { // CHECK:STDOUT: %Test.ForwardWithDef: type = import_ref Test//forward_with_def, ForwardWithDef, loaded [concrete = constants.%ForwardWithDef] // CHECK:STDOUT: %Test.import_ref.8f2: = import_ref Test//forward_with_def, loc6_23, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Test.import_ref.414 = import_ref Test//forward_with_def, inst16 [no loc], unloaded +// CHECK:STDOUT: %Test.import_ref.414 = import_ref Test//forward_with_def, inst17 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/class/import_base.carbon b/toolchain/check/testdata/class/import_base.carbon index c6038d25a9b6..74e48df39867 100644 --- a/toolchain/check/testdata/class/import_base.carbon +++ b/toolchain/check/testdata/class/import_base.carbon @@ -255,13 +255,13 @@ fn Run() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.239: = import_ref Main//a, loc10_1, loaded [concrete = constants.%complete_type.90f] -// CHECK:STDOUT: %Main.import_ref.1f3 = import_ref Main//a, inst18 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.1f3 = import_ref Main//a, inst19 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.e8f: %Base.F.type = import_ref Main//a, loc5_21, loaded [concrete = constants.%Base.F] // CHECK:STDOUT: %Main.import_ref.8bf = import_ref Main//a, loc6_26, unloaded // CHECK:STDOUT: %Main.import_ref.e67: %Base.elem = import_ref Main//a, loc8_8, loaded [concrete = %.720] // CHECK:STDOUT: %Main.import_ref.2e4 = import_ref Main//a, loc9_13, unloaded // CHECK:STDOUT: %Main.import_ref.c5f: = import_ref Main//a, loc14_1, loaded [concrete = constants.%complete_type.15c] -// CHECK:STDOUT: %Main.import_ref.9a9 = import_ref Main//a, inst111 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.9a9 = import_ref Main//a, inst112 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.7e5 = import_ref Main//a, loc13_20, unloaded // CHECK:STDOUT: %Main.import_ref.a21640.2: type = import_ref Main//a, loc13_16, loaded [concrete = constants.%Base] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] @@ -270,11 +270,11 @@ fn Run() { // CHECK:STDOUT: %.720: %Base.elem = field_decl x, element0 [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.9cd = import_ref Main//a, loc4_17, unloaded -// CHECK:STDOUT: %Main.import_ref.f8f: type = import_ref Main//a, inst18 [no loc], loaded [concrete = constants.%Base] -// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//a, inst70 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.f8f: type = import_ref Main//a, inst19 [no loc], loaded [concrete = constants.%Base] +// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//a, inst71 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.9d9: = import_ref Main//a, loc12_13, loaded [concrete = constants.%Destroy.impl_witness.cef] -// CHECK:STDOUT: %Main.import_ref.19d: type = import_ref Main//a, inst111 [no loc], loaded [concrete = constants.%Child] -// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//a, inst70 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.19d: type = import_ref Main//a, inst112 [no loc], loaded [concrete = constants.%Child] +// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//a, inst71 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.141: %Child.as.Destroy.impl.Op.type = import_ref Main//a, loc12_13, loaded [concrete = constants.%Child.as.Destroy.impl.Op] // CHECK:STDOUT: %Destroy.impl_witness_table.ad3 = impl_witness_table (%Main.import_ref.141), @Child.as.Destroy.impl [concrete] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/import_indirect.carbon b/toolchain/check/testdata/class/import_indirect.carbon index 6dd4fb2352de..7b45bde14bee 100644 --- a/toolchain/check/testdata/class/import_indirect.carbon +++ b/toolchain/check/testdata/class/import_indirect.carbon @@ -187,7 +187,7 @@ var ptr: E* = &val; // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//a, loc4_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//a, inst18 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//a, inst19 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -260,7 +260,7 @@ var ptr: E* = &val; // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//a, loc4_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//a, inst18 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//a, inst19 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -336,7 +336,7 @@ var ptr: E* = &val; // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//a, loc4_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//a, inst18 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//a, inst19 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -412,7 +412,7 @@ var ptr: E* = &val; // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//a, loc4_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//a, inst18 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//a, inst19 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -489,8 +489,8 @@ var ptr: E* = &val; // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.import_ref.8db: = import_ref Main//b, inst23 [indirect], loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//b, inst24 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.8db: = import_ref Main//b, inst24 [indirect], loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//b, inst25 [indirect], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -569,8 +569,8 @@ var ptr: E* = &val; // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.import_ref.8db: = import_ref Main//b, inst23 [indirect], loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//b, inst24 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.8db: = import_ref Main//b, inst24 [indirect], loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//b, inst25 [indirect], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/class/import_member_cycle.carbon b/toolchain/check/testdata/class/import_member_cycle.carbon index 4bf04221dab0..56a18a99cda5 100644 --- a/toolchain/check/testdata/class/import_member_cycle.carbon +++ b/toolchain/check/testdata/class/import_member_cycle.carbon @@ -125,12 +125,12 @@ fn Run() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.72d: = import_ref Main//a, loc6_1, loaded [concrete = constants.%complete_type.e4b] -// CHECK:STDOUT: %Main.import_ref.3a6 = import_ref Main//a, inst18 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.3a6 = import_ref Main//a, inst19 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.4e0 = import_ref Main//a, loc5_8, unloaded // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.4ac = import_ref Main//a, loc4_13, unloaded -// CHECK:STDOUT: %Main.import_ref.8fb: type = import_ref Main//a, inst18 [no loc], loaded [concrete = constants.%Cycle] -// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//a, inst26 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.8fb: type = import_ref Main//a, inst19 [no loc], loaded [concrete = constants.%Cycle] +// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//a, inst27 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/class/import_struct_cyle.carbon b/toolchain/check/testdata/class/import_struct_cyle.carbon index 38c515335b3c..bd858f6f0561 100644 --- a/toolchain/check/testdata/class/import_struct_cyle.carbon +++ b/toolchain/check/testdata/class/import_struct_cyle.carbon @@ -143,7 +143,7 @@ fn Run() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.b93: = import_ref Main//a, loc11_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.3a6 = import_ref Main//a, inst18 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.3a6 = import_ref Main//a, inst19 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.455: %Cycle.elem = import_ref Main//a, loc10_8, loaded [concrete = %.354] // CHECK:STDOUT: %a.patt: %pattern_type = binding_pattern a [concrete] // CHECK:STDOUT: %a.var_patt: %pattern_type = var_pattern %a.patt [concrete] diff --git a/toolchain/check/testdata/class/indirect_import_member.carbon b/toolchain/check/testdata/class/indirect_import_member.carbon index ef6548221ef4..01d127a39ddb 100644 --- a/toolchain/check/testdata/class/indirect_import_member.carbon +++ b/toolchain/check/testdata/class/indirect_import_member.carbon @@ -161,7 +161,7 @@ var x: () = D.C.F(); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: type = import_ref Main//a, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//a, loc6_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//a, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//a, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.2cf = import_ref Main//a, loc5_10, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -205,9 +205,9 @@ var x: () = D.C.F(); // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: type = import_ref Main//c, C, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.8db: = import_ref Main//c, inst21 [indirect], loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//c, inst22 [indirect], unloaded -// CHECK:STDOUT: %Main.import_ref.230 = import_ref Main//c, inst23 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.8db: = import_ref Main//c, inst22 [indirect], loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//c, inst23 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.230 = import_ref Main//c, inst24 [indirect], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -268,7 +268,7 @@ var x: () = D.C.F(); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: type = import_ref Main//a, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//a, loc6_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//a, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//a, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.943: %C.F.type = import_ref Main//a, loc5_10, loaded [concrete = constants.%C.F] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -323,9 +323,9 @@ var x: () = D.C.F(); // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: type = import_ref Main//c, C, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.8db: = import_ref Main//c, inst21 [indirect], loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//c, inst22 [indirect], unloaded -// CHECK:STDOUT: %Main.import_ref.5d3: %C.F.type = import_ref Main//c, inst23 [indirect], loaded [concrete = constants.%C.F] +// CHECK:STDOUT: %Main.import_ref.8db: = import_ref Main//c, inst22 [indirect], loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//c, inst23 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.5d3: %C.F.type = import_ref Main//c, inst24 [indirect], loaded [concrete = constants.%C.F] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -379,9 +379,9 @@ var x: () = D.C.F(); // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: type = import_ref Main//c, C, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.8db: = import_ref Main//c, inst21 [indirect], loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//c, inst22 [indirect], unloaded -// CHECK:STDOUT: %Main.import_ref.5d3: %C.F.type = import_ref Main//c, inst23 [indirect], loaded [concrete = constants.%C.F] +// CHECK:STDOUT: %Main.import_ref.8db: = import_ref Main//c, inst22 [indirect], loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//c, inst23 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.5d3: %C.F.type = import_ref Main//c, inst24 [indirect], loaded [concrete = constants.%C.F] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -437,11 +437,11 @@ var x: () = D.C.F(); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.D: type = import_ref Main//e, D, loaded [concrete = constants.%D] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//e, loc8_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.cab = import_ref Main//e, inst18 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.cab = import_ref Main//e, inst19 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.bf1: type = import_ref Main//e, loc7_9, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.8f3: = import_ref Main//e, inst24 [indirect], loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.db8 = import_ref Main//e, inst25 [indirect], unloaded -// CHECK:STDOUT: %Main.import_ref.c85: %C.F.type = import_ref Main//e, inst26 [indirect], loaded [concrete = constants.%C.F] +// CHECK:STDOUT: %Main.import_ref.8f3: = import_ref Main//e, inst25 [indirect], loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %Main.import_ref.db8 = import_ref Main//e, inst26 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.c85: %C.F.type = import_ref Main//e, inst27 [indirect], loaded [concrete = constants.%C.F] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -506,11 +506,11 @@ var x: () = D.C.F(); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.D: type = import_ref Main//e, D, loaded [concrete = constants.%D] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//e, loc8_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.cab = import_ref Main//e, inst18 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.cab = import_ref Main//e, inst19 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.bf1: type = import_ref Main//e, loc7_9, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.8f3: = import_ref Main//e, inst24 [indirect], loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.db8 = import_ref Main//e, inst25 [indirect], unloaded -// CHECK:STDOUT: %Main.import_ref.c85: %C.F.type = import_ref Main//e, inst26 [indirect], loaded [concrete = constants.%C.F] +// CHECK:STDOUT: %Main.import_ref.8f3: = import_ref Main//e, inst25 [indirect], loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %Main.import_ref.db8 = import_ref Main//e, inst26 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.c85: %C.F.type = import_ref Main//e, inst27 [indirect], loaded [concrete = constants.%C.F] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/class/syntactic_merge.carbon b/toolchain/check/testdata/class/syntactic_merge.carbon index ef29047f36f6..28ab27628966 100644 --- a/toolchain/check/testdata/class/syntactic_merge.carbon +++ b/toolchain/check/testdata/class/syntactic_merge.carbon @@ -565,7 +565,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %Main.C: type = import_ref Main//two_file, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.D: type = import_ref Main//two_file, D, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//two_file, loc4_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//two_file, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//two_file, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.f97b44.1: %C = import_ref Main//two_file, loc7_11, loaded [symbolic = @Foo.%a.1 (constants.%a)] // CHECK:STDOUT: %Main.import_ref.f97b44.2: %C = import_ref Main//two_file, loc8_11, loaded [symbolic = @Bar.%a.1 (constants.%a)] // CHECK:STDOUT: } @@ -928,7 +928,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: type = import_ref Main//alias_two_file, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//alias_two_file, loc4_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//alias_two_file, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//alias_two_file, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.f97: %C = import_ref Main//alias_two_file, loc6_11, loaded [symbolic = @Foo.%a.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/virtual_modifiers.carbon b/toolchain/check/testdata/class/virtual_modifiers.carbon index 69486d85aefc..10819f1a1581 100644 --- a/toolchain/check/testdata/class/virtual_modifiers.carbon +++ b/toolchain/check/testdata/class/virtual_modifiers.carbon @@ -721,7 +721,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %Modifiers.Base: type = import_ref Modifiers//default, Base, loaded [concrete = constants.%Base] // CHECK:STDOUT: %Modifiers.import_ref.be7: ref %ptr.454 = import_ref Modifiers//default, loc6_1, loaded [concrete = constants.%Base.vtable_ptr] // CHECK:STDOUT: %Modifiers.import_ref.05e: = import_ref Modifiers//default, loc6_1, loaded [concrete = constants.%complete_type.513] -// CHECK:STDOUT: %Modifiers.import_ref.1f3 = import_ref Modifiers//default, inst18 [no loc], unloaded +// CHECK:STDOUT: %Modifiers.import_ref.1f3 = import_ref Modifiers//default, inst19 [no loc], unloaded // CHECK:STDOUT: %Modifiers.import_ref.2cc = import_ref Modifiers//default, loc5_29, unloaded // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: } @@ -872,7 +872,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %Modifiers.Base: type = import_ref Modifiers//default, Base, loaded [concrete = constants.%Base] // CHECK:STDOUT: %Modifiers.import_ref.be7: ref %ptr.454 = import_ref Modifiers//default, loc6_1, loaded [concrete = constants.%Base.vtable_ptr] // CHECK:STDOUT: %Modifiers.import_ref.05e: = import_ref Modifiers//default, loc6_1, loaded [concrete = constants.%complete_type.513] -// CHECK:STDOUT: %Modifiers.import_ref.1f3 = import_ref Modifiers//default, inst18 [no loc], unloaded +// CHECK:STDOUT: %Modifiers.import_ref.1f3 = import_ref Modifiers//default, inst19 [no loc], unloaded // CHECK:STDOUT: %Modifiers.import_ref.2cc = import_ref Modifiers//default, loc5_29, unloaded // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: } @@ -994,20 +994,20 @@ class T2(G2:! type) { // CHECK:STDOUT: %Modifiers.Base: type = import_ref Modifiers//default, Base, loaded [concrete = constants.%Base] // CHECK:STDOUT: %Modifiers.import_ref.be7: ref %ptr.454 = import_ref Modifiers//default, loc6_1, loaded [concrete = constants.%Base.vtable_ptr] // CHECK:STDOUT: %Modifiers.import_ref.05ec96.1: = import_ref Modifiers//default, loc6_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Modifiers.import_ref.1f3 = import_ref Modifiers//default, inst18 [no loc], unloaded +// CHECK:STDOUT: %Modifiers.import_ref.1f3 = import_ref Modifiers//default, inst19 [no loc], unloaded // CHECK:STDOUT: %Modifiers.import_ref.2cc = import_ref Modifiers//default, loc5_29, unloaded // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Modifiers.import_ref.fe3: = import_ref Modifiers//default, loc4_17, loaded [concrete = constants.%Destroy.impl_witness.2fb] -// CHECK:STDOUT: %Modifiers.import_ref.f8f: type = import_ref Modifiers//default, inst18 [no loc], loaded [concrete = constants.%Base] -// CHECK:STDOUT: %Modifiers.import_ref.cb9298.1: type = import_ref Modifiers//default, inst31 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Modifiers.import_ref.f8f: type = import_ref Modifiers//default, inst19 [no loc], loaded [concrete = constants.%Base] +// CHECK:STDOUT: %Modifiers.import_ref.cb9298.1: type = import_ref Modifiers//default, inst32 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Modifiers.import_ref.5f6 = import_ref Modifiers//default, loc8_25, unloaded // CHECK:STDOUT: %Modifiers.import_ref.e657ad.2 = import_ref Modifiers//default, loc12_1, unloaded // CHECK:STDOUT: %Modifiers.import_ref.05ec96.2: = import_ref Modifiers//default, loc12_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Modifiers.import_ref.ee1 = import_ref Modifiers//default, inst75 [no loc], unloaded +// CHECK:STDOUT: %Modifiers.import_ref.ee1 = import_ref Modifiers//default, inst76 [no loc], unloaded // CHECK:STDOUT: %Modifiers.import_ref.bf4 = import_ref Modifiers//default, loc9_30, unloaded // CHECK:STDOUT: %Modifiers.import_ref.b87 = import_ref Modifiers//default, loc11_29, unloaded -// CHECK:STDOUT: %Modifiers.import_ref.ce7: type = import_ref Modifiers//default, inst75 [no loc], loaded [concrete = constants.%Abstract] -// CHECK:STDOUT: %Modifiers.import_ref.cb9298.2: type = import_ref Modifiers//default, inst31 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Modifiers.import_ref.ce7: type = import_ref Modifiers//default, inst76 [no loc], loaded [concrete = constants.%Abstract] +// CHECK:STDOUT: %Modifiers.import_ref.cb9298.2: type = import_ref Modifiers//default, inst32 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Modifiers.import_ref.39f: %Base.as.Destroy.impl.Op.type = import_ref Modifiers//default, loc4_17, loaded [concrete = constants.%Base.as.Destroy.impl.Op] // CHECK:STDOUT: %Destroy.impl_witness_table.37d = impl_witness_table (%Modifiers.import_ref.39f), @Base.as.Destroy.impl [concrete] // CHECK:STDOUT: } @@ -4242,7 +4242,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %Modifiers.Base: type = import_ref Modifiers//default, Base, loaded [concrete = constants.%Base] // CHECK:STDOUT: %Modifiers.import_ref.39e92f.2 = import_ref Modifiers//default, loc6_1, unloaded // CHECK:STDOUT: %Modifiers.import_ref.05e: = import_ref Modifiers//default, loc6_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Modifiers.import_ref.1f3 = import_ref Modifiers//default, inst18 [no loc], unloaded +// CHECK:STDOUT: %Modifiers.import_ref.1f3 = import_ref Modifiers//default, inst19 [no loc], unloaded // CHECK:STDOUT: %Modifiers.import_ref.2cc = import_ref Modifiers//default, loc5_29, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -6808,12 +6808,12 @@ class T2(G2:! type) { // CHECK:STDOUT: %Main.import_ref.03f: ref %ptr.454 = import_ref Main//generic_lib, loc6_1, loaded [symbolic = @Base.%vtable_ptr (constants.%Base.vtable_ptr.f15b84.3)] // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//generic_lib, loc4_17, loaded [symbolic = @Base.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.05e: = import_ref Main//generic_lib, loc6_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.8e0 = import_ref Main//generic_lib, inst26 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.8e0 = import_ref Main//generic_lib, inst27 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.e54 = import_ref Main//generic_lib, loc5_30, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//generic_lib, loc4_17, loaded [symbolic = @Base.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.4f4e13.1: = import_ref Main//generic_lib, inst46 [no loc], loaded [symbolic = constants.%Base.F.specific_fn.892] -// CHECK:STDOUT: %Main.import_ref.4f4e13.2: = import_ref Main//generic_lib, inst46 [no loc], loaded [symbolic = constants.%Base.F.specific_fn.892] -// CHECK:STDOUT: %Main.import_ref.4f4e13.3: = import_ref Main//generic_lib, inst46 [no loc], loaded [symbolic = constants.%Base.F.specific_fn.892] +// CHECK:STDOUT: %Main.import_ref.4f4e13.1: = import_ref Main//generic_lib, inst47 [no loc], loaded [symbolic = constants.%Base.F.specific_fn.892] +// CHECK:STDOUT: %Main.import_ref.4f4e13.2: = import_ref Main//generic_lib, inst47 [no loc], loaded [symbolic = constants.%Base.F.specific_fn.892] +// CHECK:STDOUT: %Main.import_ref.4f4e13.3: = import_ref Main//generic_lib, inst47 [no loc], loaded [symbolic = constants.%Base.F.specific_fn.892] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/for/actual.carbon b/toolchain/check/testdata/for/actual.carbon index ab55c2e6dcd6..3f023f732ad5 100644 --- a/toolchain/check/testdata/for/actual.carbon +++ b/toolchain/check/testdata/for/actual.carbon @@ -217,26 +217,26 @@ fn Read() { // CHECK:STDOUT: %Core.import_ref.1c9: %Iterate.assoc_type = import_ref Core//prelude/iterate, loc12_18, loaded [concrete = constants.%assoc0.724] // CHECK:STDOUT: %Core.import_ref.ed6: %Iterate.assoc_type = import_ref Core//prelude/iterate, loc13_17, loaded [concrete = constants.%assoc1.02e] // CHECK:STDOUT: %Core.import_ref.9e6: type = import_ref Core//prelude/iterate, loc13_17, loaded [concrete = %CursorType] -// CHECK:STDOUT: %Core.import_ref.f49c: @Optional.%Optional.None.type (%Optional.None.type.ef2) = import_ref Core//prelude/iterate, inst131 [indirect], loaded [symbolic = @Optional.%Optional.None (constants.%Optional.None.fd6)] -// CHECK:STDOUT: %Core.import_ref.1a8: @Optional.%Optional.Some.type (%Optional.Some.type.b2c) = import_ref Core//prelude/iterate, inst132 [indirect], loaded [symbolic = @Optional.%Optional.Some (constants.%Optional.Some.d0d)] -// CHECK:STDOUT: %Core.import_ref.cf4: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.0f9) = import_ref Core//prelude/iterate, inst471 [indirect], loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f06)] +// CHECK:STDOUT: %Core.import_ref.f49c: @Optional.%Optional.None.type (%Optional.None.type.ef2) = import_ref Core//prelude/iterate, inst134 [indirect], loaded [symbolic = @Optional.%Optional.None (constants.%Optional.None.fd6)] +// CHECK:STDOUT: %Core.import_ref.1a8: @Optional.%Optional.Some.type (%Optional.Some.type.b2c) = import_ref Core//prelude/iterate, inst135 [indirect], loaded [symbolic = @Optional.%Optional.Some (constants.%Optional.Some.d0d)] +// CHECK:STDOUT: %Core.import_ref.cf4: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.0f9) = import_ref Core//prelude/iterate, inst474 [indirect], loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.2b9 = impl_witness_table (%Core.import_ref.cf4), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: %Core.import_ref.741: @Int.as.Destroy.impl.%Int.as.Destroy.impl.Op.type (%Int.as.Destroy.impl.Op.type) = import_ref Core//prelude/iterate, inst440 [indirect], loaded [symbolic = @Int.as.Destroy.impl.%Int.as.Destroy.impl.Op (constants.%Int.as.Destroy.impl.Op)] +// CHECK:STDOUT: %Core.import_ref.741: @Int.as.Destroy.impl.%Int.as.Destroy.impl.Op.type (%Int.as.Destroy.impl.Op.type) = import_ref Core//prelude/iterate, inst443 [indirect], loaded [symbolic = @Int.as.Destroy.impl.%Int.as.Destroy.impl.Op (constants.%Int.as.Destroy.impl.Op)] // CHECK:STDOUT: %Destroy.impl_witness_table.1b4 = impl_witness_table (%Core.import_ref.741), @Int.as.Destroy.impl [concrete] -// CHECK:STDOUT: %Core.import_ref.19a: @OrderedWith.%OrderedWith.assoc_type (%OrderedWith.assoc_type.03c) = import_ref Core//prelude/iterate, inst851 [indirect], loaded [symbolic = @OrderedWith.%assoc0 (constants.%assoc0.5db)] -// CHECK:STDOUT: %Core.import_ref.b2b: @Int.as.OrderedWith.impl.db3.%Int.as.OrderedWith.impl.Less.type (%Int.as.OrderedWith.impl.Less.type.2c7) = import_ref Core//prelude/iterate, inst940 [indirect], loaded [symbolic = @Int.as.OrderedWith.impl.db3.%Int.as.OrderedWith.impl.Less (constants.%Int.as.OrderedWith.impl.Less.a5a)] -// CHECK:STDOUT: %Core.import_ref.ab6 = import_ref Core//prelude/iterate, inst941 [indirect], unloaded -// CHECK:STDOUT: %Core.import_ref.875 = import_ref Core//prelude/iterate, inst942 [indirect], unloaded -// CHECK:STDOUT: %Core.import_ref.82b = import_ref Core//prelude/iterate, inst943 [indirect], unloaded +// CHECK:STDOUT: %Core.import_ref.19a: @OrderedWith.%OrderedWith.assoc_type (%OrderedWith.assoc_type.03c) = import_ref Core//prelude/iterate, inst854 [indirect], loaded [symbolic = @OrderedWith.%assoc0 (constants.%assoc0.5db)] +// CHECK:STDOUT: %Core.import_ref.b2b: @Int.as.OrderedWith.impl.db3.%Int.as.OrderedWith.impl.Less.type (%Int.as.OrderedWith.impl.Less.type.2c7) = import_ref Core//prelude/iterate, inst943 [indirect], loaded [symbolic = @Int.as.OrderedWith.impl.db3.%Int.as.OrderedWith.impl.Less (constants.%Int.as.OrderedWith.impl.Less.a5a)] +// CHECK:STDOUT: %Core.import_ref.ab6 = import_ref Core//prelude/iterate, inst944 [indirect], unloaded +// CHECK:STDOUT: %Core.import_ref.875 = import_ref Core//prelude/iterate, inst945 [indirect], unloaded +// CHECK:STDOUT: %Core.import_ref.82b = import_ref Core//prelude/iterate, inst946 [indirect], unloaded // CHECK:STDOUT: %OrderedWith.impl_witness_table.476 = impl_witness_table (%Core.import_ref.b2b, %Core.import_ref.ab6, %Core.import_ref.875, %Core.import_ref.82b), @Int.as.OrderedWith.impl.db3 [concrete] -// CHECK:STDOUT: %Core.import_ref.13d: @OrderedWith.%OrderedWith.Less.type (%OrderedWith.Less.type.f19) = import_ref Core//prelude/iterate, inst1915 [indirect], loaded [symbolic = @OrderedWith.%OrderedWith.Less (constants.%OrderedWith.Less.02e)] +// CHECK:STDOUT: %Core.import_ref.13d: @OrderedWith.%OrderedWith.Less.type (%OrderedWith.Less.type.f19) = import_ref Core//prelude/iterate, inst1918 [indirect], loaded [symbolic = @OrderedWith.%OrderedWith.Less (constants.%OrderedWith.Less.02e)] // CHECK:STDOUT: %CursorType: type = assoc_const_decl @CursorType [concrete] {} // CHECK:STDOUT: %Core.import_ref.4f9: type = import_ref Core//prelude/iterate, loc12_18, loaded [concrete = %ElementType] // CHECK:STDOUT: %ElementType: type = assoc_const_decl @ElementType [concrete] {} // CHECK:STDOUT: %Core.Optional: %Optional.type = import_ref Core//prelude/types/optional, Optional, loaded [concrete = constants.%Optional.generic] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Core.OrderedWith: %OrderedWith.type.270 = import_ref Core//prelude/operators/comparison, OrderedWith, loaded [concrete = constants.%OrderedWith.generic] -// CHECK:STDOUT: %Core.import_ref.d49 = import_ref Core//prelude/iterate, inst6633 [indirect], unloaded +// CHECK:STDOUT: %Core.import_ref.d49 = import_ref Core//prelude/iterate, inst6636 [indirect], unloaded // CHECK:STDOUT: %Core.Inc: type = import_ref Core//prelude/operators/arithmetic, Inc, loaded [concrete = constants.%Inc.type] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } @@ -759,6 +759,10 @@ fn Read() { // CHECK:STDOUT: // CHECK:STDOUT: specific @CursorType(constants.%Iterate.facet.7f1) {} // CHECK:STDOUT: +// CHECK:STDOUT: specific @ElementType(constants.%Self.a96) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ElementType(constants.%Iterate.facet.7f1) {} +// CHECK:STDOUT: // CHECK:STDOUT: specific @IntRange.as.Iterate.impl(constants.%N.c80) { // CHECK:STDOUT: %N => constants.%N.c80 // CHECK:STDOUT: %IntRange => constants.%IntRange.349 @@ -973,7 +977,7 @@ fn Read() { // CHECK:STDOUT: %Core.IntLiteral: %IntLiteral.type = import_ref Core//prelude/types/int_literal, IntLiteral, loaded [concrete = constants.%IntLiteral] // CHECK:STDOUT: %Main.import_ref.f1e294.1: Core.IntLiteral = import_ref Main//lib, loc4_16, loaded [symbolic = @IntRange.%N (constants.%N.c80)] // CHECK:STDOUT: %Main.import_ref.30f: = import_ref Main//lib, loc24_1, loaded [symbolic = @IntRange.%complete_type (constants.%complete_type.c76)] -// CHECK:STDOUT: %Main.import_ref.d13 = import_ref Main//lib, inst39 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.d13 = import_ref Main//lib, inst40 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.d98 = import_ref Main//lib, loc5_57, unloaded // CHECK:STDOUT: %Main.import_ref.e58 = import_ref Main//lib, loc22_20, unloaded // CHECK:STDOUT: %Main.import_ref.261 = import_ref Main//lib, loc23_18, unloaded @@ -1000,11 +1004,11 @@ fn Read() { // CHECK:STDOUT: %Iterate.impl_witness_table.b32 = impl_witness_table (%Main.import_ref.e3faa9.1, %Main.import_ref.e3faa9.2, %Main.import_ref.11c, %Main.import_ref.f97), @IntRange.as.Iterate.impl [concrete] // CHECK:STDOUT: %Main.import_ref.f1e294.4: Core.IntLiteral = import_ref Main//lib, loc4_16, loaded [symbolic = @IntRange.%N (constants.%N.c80)] // CHECK:STDOUT: %Main.import_ref.f1e294.5: Core.IntLiteral = import_ref Main//lib, loc4_16, loaded [symbolic = @IntRange.%N (constants.%N.c80)] -// CHECK:STDOUT: %Main.import_ref.026 = import_ref Main//lib, inst1890 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.026 = import_ref Main//lib, inst1891 [indirect], unloaded // CHECK:STDOUT: %Main.import_ref.921 = import_ref Main//lib, loc4_39, unloaded // CHECK:STDOUT: %Main.import_ref.f1e294.6: Core.IntLiteral = import_ref Main//lib, loc4_16, loaded [symbolic = @IntRange.%N (constants.%N.c80)] -// CHECK:STDOUT: %Main.import_ref.e9a: type = import_ref Main//lib, inst39 [no loc], loaded [symbolic = constants.%IntRange.349] -// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//lib, inst297 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.e9a: type = import_ref Main//lib, inst40 [no loc], loaded [symbolic = constants.%IntRange.349] +// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//lib, inst298 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.b63 = import_ref Main//lib, loc4_39, unloaded // CHECK:STDOUT: %Destroy.impl_witness_table.901 = impl_witness_table (%Main.import_ref.b63), @IntRange.as.Destroy.impl [concrete] // CHECK:STDOUT: %Main.import_ref.f1e294.7: Core.IntLiteral = import_ref Main//lib, loc4_16, loaded [symbolic = @IntRange.%N (constants.%N.c80)] diff --git a/toolchain/check/testdata/for/basic.carbon b/toolchain/check/testdata/for/basic.carbon index 48f9f24c0e69..596ad7d88cf8 100644 --- a/toolchain/check/testdata/for/basic.carbon +++ b/toolchain/check/testdata/for/basic.carbon @@ -103,8 +103,8 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.cd6: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.a15) = import_ref Core//prelude/parts/iterate, inst98 [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.73f)] -// CHECK:STDOUT: %Core.import_ref.4fd: @Optional.%Optional.Get.type (%Optional.Get.type.e03) = import_ref Core//prelude/parts/iterate, inst99 [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.971)] +// CHECK:STDOUT: %Core.import_ref.cd6: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.a15) = import_ref Core//prelude/parts/iterate, inst99 [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.73f)] +// CHECK:STDOUT: %Core.import_ref.4fd: @Optional.%Optional.Get.type (%Optional.Get.type.e03) = import_ref Core//prelude/parts/iterate, inst100 [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.971)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { diff --git a/toolchain/check/testdata/for/pattern.carbon b/toolchain/check/testdata/for/pattern.carbon index f4d4ce52e4df..ccaf01e2275a 100644 --- a/toolchain/check/testdata/for/pattern.carbon +++ b/toolchain/check/testdata/for/pattern.carbon @@ -186,8 +186,8 @@ fn Run() { // CHECK:STDOUT: %Main.import_ref.57b: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor.type (%EmptyRange.as.Iterate.impl.NewCursor.type.f5f) = import_ref Main//empty_range, loc8_38, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor (constants.%EmptyRange.as.Iterate.impl.NewCursor.ec1)] // CHECK:STDOUT: %Main.import_ref.170: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next.type (%EmptyRange.as.Iterate.impl.Next.type.264) = import_ref Main//empty_range, loc11_58, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next (constants.%EmptyRange.as.Iterate.impl.Next.08e)] // CHECK:STDOUT: %Iterate.impl_witness_table = impl_witness_table (%Main.import_ref.6ce, %Main.import_ref.999, %Main.import_ref.57b, %Main.import_ref.170), @EmptyRange.as.Iterate.impl [concrete] -// CHECK:STDOUT: %Main.import_ref.7f9: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.f81) = import_ref Main//empty_range, inst136 [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.6fd)] -// CHECK:STDOUT: %Main.import_ref.d10: @Optional.%Optional.Get.type (%Optional.Get.type.b8f) = import_ref Main//empty_range, inst137 [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.9c8)] +// CHECK:STDOUT: %Main.import_ref.7f9: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.f81) = import_ref Main//empty_range, inst137 [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.6fd)] +// CHECK:STDOUT: %Main.import_ref.d10: @Optional.%Optional.Get.type (%Optional.Get.type.b8f) = import_ref Main//empty_range, inst138 [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.9c8)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { @@ -343,8 +343,8 @@ fn Run() { // CHECK:STDOUT: %Main.import_ref.57b: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor.type (%EmptyRange.as.Iterate.impl.NewCursor.type.f5f) = import_ref Main//empty_range, loc8_38, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor (constants.%EmptyRange.as.Iterate.impl.NewCursor.ec1)] // CHECK:STDOUT: %Main.import_ref.170: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next.type (%EmptyRange.as.Iterate.impl.Next.type.264) = import_ref Main//empty_range, loc11_58, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next (constants.%EmptyRange.as.Iterate.impl.Next.08e)] // CHECK:STDOUT: %Iterate.impl_witness_table = impl_witness_table (%Main.import_ref.6ce, %Main.import_ref.999, %Main.import_ref.57b, %Main.import_ref.170), @EmptyRange.as.Iterate.impl [concrete] -// CHECK:STDOUT: %Main.import_ref.7f9: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.f81) = import_ref Main//empty_range, inst136 [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.6fd)] -// CHECK:STDOUT: %Main.import_ref.d10: @Optional.%Optional.Get.type (%Optional.Get.type.b8f) = import_ref Main//empty_range, inst137 [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.9c8)] +// CHECK:STDOUT: %Main.import_ref.7f9: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.f81) = import_ref Main//empty_range, inst137 [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.6fd)] +// CHECK:STDOUT: %Main.import_ref.d10: @Optional.%Optional.Get.type (%Optional.Get.type.b8f) = import_ref Main//empty_range, inst138 [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.9c8)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { @@ -509,8 +509,8 @@ fn Run() { // CHECK:STDOUT: %Main.import_ref.57b: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor.type (%EmptyRange.as.Iterate.impl.NewCursor.type.f5f) = import_ref Main//empty_range, loc8_38, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor (constants.%EmptyRange.as.Iterate.impl.NewCursor.ec1)] // CHECK:STDOUT: %Main.import_ref.170: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next.type (%EmptyRange.as.Iterate.impl.Next.type.264) = import_ref Main//empty_range, loc11_58, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next (constants.%EmptyRange.as.Iterate.impl.Next.08e)] // CHECK:STDOUT: %Iterate.impl_witness_table = impl_witness_table (%Main.import_ref.6ce, %Main.import_ref.999, %Main.import_ref.57b, %Main.import_ref.170), @EmptyRange.as.Iterate.impl [concrete] -// CHECK:STDOUT: %Main.import_ref.7f9: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.f81) = import_ref Main//empty_range, inst136 [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.6fd)] -// CHECK:STDOUT: %Main.import_ref.d10: @Optional.%Optional.Get.type (%Optional.Get.type.b8f) = import_ref Main//empty_range, inst137 [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.9c8)] +// CHECK:STDOUT: %Main.import_ref.7f9: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.f81) = import_ref Main//empty_range, inst137 [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.6fd)] +// CHECK:STDOUT: %Main.import_ref.d10: @Optional.%Optional.Get.type (%Optional.Get.type.b8f) = import_ref Main//empty_range, inst138 [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.9c8)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { @@ -694,8 +694,8 @@ fn Run() { // CHECK:STDOUT: %Main.import_ref.57b: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor.type (%EmptyRange.as.Iterate.impl.NewCursor.type.f5f) = import_ref Main//empty_range, loc8_38, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor (constants.%EmptyRange.as.Iterate.impl.NewCursor.ec1)] // CHECK:STDOUT: %Main.import_ref.170: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next.type (%EmptyRange.as.Iterate.impl.Next.type.264) = import_ref Main//empty_range, loc11_58, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next (constants.%EmptyRange.as.Iterate.impl.Next.08e)] // CHECK:STDOUT: %Iterate.impl_witness_table = impl_witness_table (%Main.import_ref.6ce, %Main.import_ref.999, %Main.import_ref.57b, %Main.import_ref.170), @EmptyRange.as.Iterate.impl [concrete] -// CHECK:STDOUT: %Main.import_ref.7f9: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.f81) = import_ref Main//empty_range, inst136 [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.6fd)] -// CHECK:STDOUT: %Main.import_ref.d10: @Optional.%Optional.Get.type (%Optional.Get.type.b8f) = import_ref Main//empty_range, inst137 [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.9c8)] +// CHECK:STDOUT: %Main.import_ref.7f9: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.f81) = import_ref Main//empty_range, inst137 [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.6fd)] +// CHECK:STDOUT: %Main.import_ref.d10: @Optional.%Optional.Get.type (%Optional.Get.type.b8f) = import_ref Main//empty_range, inst138 [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.9c8)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { diff --git a/toolchain/check/testdata/function/builtin/call_from_operator.carbon b/toolchain/check/testdata/function/builtin/call_from_operator.carbon index 3ffbbe516e50..a7392f9d52ee 100644 --- a/toolchain/check/testdata/function/builtin/call_from_operator.carbon +++ b/toolchain/check/testdata/function/builtin/call_from_operator.carbon @@ -761,36 +761,36 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//default, Int, loaded [concrete = constants.%Int] // CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//default, As, loaded [concrete = constants.%As.generic] // CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc11_14, loaded [symbolic = @As.%T (constants.%T)] -// CHECK:STDOUT: %Core.import_ref.a7c = import_ref Core//default, inst103 [no loc], unloaded +// CHECK:STDOUT: %Core.import_ref.a7c = import_ref Core//default, inst104 [no loc], unloaded // CHECK:STDOUT: %Core.import_ref.5e1: @As.%As.assoc_type (%As.assoc_type.760) = import_ref Core//default, loc12_32, loaded [symbolic = @As.%assoc0 (constants.%assoc0.97d)] // CHECK:STDOUT: %Core.Convert.313 = import_ref Core//default, Convert, unloaded // CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc11_14, loaded [symbolic = @As.%T (constants.%T)] -// CHECK:STDOUT: %Core.import_ref.996: @As.%As.type (%As.type.eed) = import_ref Core//default, inst103 [no loc], loaded [symbolic = @As.%Self (constants.%Self.65a)] +// CHECK:STDOUT: %Core.import_ref.996: @As.%As.type (%As.type.eed) = import_ref Core//default, inst104 [no loc], loaded [symbolic = @As.%Self (constants.%Self.65a)] // CHECK:STDOUT: %Core.import_ref.708: @As.%As.Convert.type (%As.Convert.type.843) = import_ref Core//default, loc12_32, loaded [symbolic = @As.%As.Convert (constants.%As.Convert.95f)] // CHECK:STDOUT: %Core.import_ref.4e8 = import_ref Core//default, loc12_32, unloaded // CHECK:STDOUT: %Core.import_ref.5ab3ec.3: type = import_ref Core//default, loc7_19, loaded [symbolic = @AddWith.%T (constants.%T)] -// CHECK:STDOUT: %Core.import_ref.476 = import_ref Core//default, inst49 [no loc], unloaded +// CHECK:STDOUT: %Core.import_ref.476 = import_ref Core//default, inst50 [no loc], unloaded // CHECK:STDOUT: %Core.import_ref.35d: @AddWith.%AddWith.assoc_type (%AddWith.assoc_type.c10) = import_ref Core//default, loc8_41, loaded [symbolic = @AddWith.%assoc0 (constants.%assoc0.89962d.2)] // CHECK:STDOUT: %Core.Op = import_ref Core//default, Op, unloaded // CHECK:STDOUT: %Core.import_ref.772: = import_ref Core//default, loc19_26, loaded [concrete = constants.%AddWith.impl_witness] // CHECK:STDOUT: %Core.import_ref.c8c7cd.1: type = import_ref Core//default, loc19_6, loaded [concrete = constants.%i32.builtin] // CHECK:STDOUT: %Core.import_ref.ef3: type = import_ref Core//default, loc19_24, loaded [concrete = constants.%AddWith.type.6f5] // CHECK:STDOUT: %Core.import_ref.5ab3ec.4: type = import_ref Core//default, loc7_19, loaded [symbolic = @AddWith.%T (constants.%T)] -// CHECK:STDOUT: %Core.import_ref.6bf: @AddWith.%AddWith.type (%AddWith.type.6d3) = import_ref Core//default, inst49 [no loc], loaded [symbolic = @AddWith.%Self (constants.%Self.6c1)] +// CHECK:STDOUT: %Core.import_ref.6bf: @AddWith.%AddWith.type (%AddWith.type.6d3) = import_ref Core//default, inst50 [no loc], loaded [symbolic = @AddWith.%Self (constants.%Self.6c1)] // CHECK:STDOUT: %Core.import_ref.7e6ace.1 = import_ref Core//default, loc8_41, unloaded // CHECK:STDOUT: %Core.import_ref.1b9: @AddWith.%AddWith.Op.type (%AddWith.Op.type.22d) = import_ref Core//default, loc8_41, loaded [symbolic = @AddWith.%AddWith.Op (constants.%AddWith.Op.965)] // CHECK:STDOUT: %Core.import_ref.cb6: = import_ref Core//default, loc23_30, loaded [concrete = constants.%As.impl_witness] // CHECK:STDOUT: %Core.import_ref.8721d7.1: type = import_ref Core//default, loc23_17, loaded [concrete = Core.IntLiteral] // CHECK:STDOUT: %Core.import_ref.1e5: type = import_ref Core//default, loc23_28, loaded [concrete = constants.%As.type.a6d] // CHECK:STDOUT: %Core.import_ref.5ab3ec.5: type = import_ref Core//default, loc15_22, loaded [symbolic = @ImplicitAs.%T (constants.%T)] -// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst147 [no loc], unloaded +// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst148 [no loc], unloaded // CHECK:STDOUT: %Core.import_ref.492: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ca0) = import_ref Core//default, loc16_32, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.dc001e.2)] // CHECK:STDOUT: %Core.Convert.e69 = import_ref Core//default, Convert, unloaded // CHECK:STDOUT: %Core.import_ref.c62: = import_ref Core//default, loc27_38, loaded [concrete = constants.%ImplicitAs.impl_witness.07a] // CHECK:STDOUT: %Core.import_ref.8721d7.2: type = import_ref Core//default, loc27_17, loaded [concrete = Core.IntLiteral] // CHECK:STDOUT: %Core.import_ref.4d9: type = import_ref Core//default, loc27_36, loaded [concrete = constants.%ImplicitAs.type.61e] // CHECK:STDOUT: %Core.import_ref.5ab3ec.6: type = import_ref Core//default, loc15_22, loaded [symbolic = @ImplicitAs.%T (constants.%T)] -// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst147 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)] +// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst148 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)] // CHECK:STDOUT: %Core.import_ref.207961.1 = import_ref Core//default, loc16_32, unloaded // CHECK:STDOUT: %Core.import_ref.1c752f.1: @ImplicitAs.%ImplicitAs.Convert.type (%ImplicitAs.Convert.type.275) = import_ref Core//default, loc16_32, loaded [symbolic = @ImplicitAs.%ImplicitAs.Convert (constants.%ImplicitAs.Convert.42e)] // CHECK:STDOUT: %Core.import_ref.c5f: = import_ref Core//default, loc31_38, loaded [concrete = constants.%ImplicitAs.impl_witness.9c5] diff --git a/toolchain/check/testdata/function/declaration/fail_import_incomplete_return.carbon b/toolchain/check/testdata/function/declaration/fail_import_incomplete_return.carbon index bf2984e38e7a..123258acd5e0 100644 --- a/toolchain/check/testdata/function/declaration/fail_import_incomplete_return.carbon +++ b/toolchain/check/testdata/function/declaration/fail_import_incomplete_return.carbon @@ -262,13 +262,13 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//incomplete_return, loc37_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.cabe25.1 = import_ref Main//incomplete_return, inst20 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.cabe25.1 = import_ref Main//incomplete_return, inst21 [no loc], unloaded // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.7ba: = import_ref Main//incomplete_return, loc37_9, loaded [concrete = constants.%Destroy.impl_witness.b6f] // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//incomplete_return, loc37_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.cabe25.2 = import_ref Main//incomplete_return, inst20 [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.4aa: type = import_ref Main//incomplete_return, inst20 [no loc], loaded [concrete = constants.%D.b3dde2.1] -// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//incomplete_return, inst67 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.cabe25.2 = import_ref Main//incomplete_return, inst21 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.4aa: type = import_ref Main//incomplete_return, inst21 [no loc], loaded [concrete = constants.%D.b3dde2.1] +// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//incomplete_return, inst68 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.283: %D.as.Destroy.impl.Op.type = import_ref Main//incomplete_return, loc37_9, loaded [concrete = constants.%D.as.Destroy.impl.Op] // CHECK:STDOUT: %Destroy.impl_witness_table.cd7 = impl_witness_table (%Main.import_ref.283), @D.as.Destroy.impl [concrete] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/definition/syntactic_merge.carbon b/toolchain/check/testdata/function/definition/syntactic_merge.carbon index a15449867eef..7ea7ab0dfbc8 100644 --- a/toolchain/check/testdata/function/definition/syntactic_merge.carbon +++ b/toolchain/check/testdata/function/definition/syntactic_merge.carbon @@ -534,7 +534,7 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %Main.C: type = import_ref Main//two_file, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.D: type = import_ref Main//two_file, D, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//two_file, loc4_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//two_file, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//two_file, inst17 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -872,7 +872,7 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: type = import_ref Main//alias_two_file, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//alias_two_file, loc4_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//alias_two_file, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//alias_two_file, inst17 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/function/generic/fail_deduce_imported_function.carbon b/toolchain/check/testdata/function/generic/fail_deduce_imported_function.carbon index 29d16560587f..595ea0f59555 100644 --- a/toolchain/check/testdata/function/generic/fail_deduce_imported_function.carbon +++ b/toolchain/check/testdata/function/generic/fail_deduce_imported_function.carbon @@ -141,7 +141,7 @@ fn B() { // CHECK:STDOUT: import Lib//default // CHECK:STDOUT: } // CHECK:STDOUT: %Lib.Z: type = import_ref Lib//default, Z, loaded [concrete = constants.%Z.type] -// CHECK:STDOUT: %Lib.import_ref.f88 = import_ref Lib//default, inst17 [no loc], unloaded +// CHECK:STDOUT: %Lib.import_ref.f88 = import_ref Lib//default, inst18 [no loc], unloaded // CHECK:STDOUT: %Lib.A: %A.type.fad = import_ref Lib//default, A, loaded [concrete = constants.%A.7a0] // CHECK:STDOUT: %Lib.import_ref.be7: %Z.type = import_ref Lib//default, loc4_6, loaded [symbolic = @A.1.%T (constants.%T)] // CHECK:STDOUT: } 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 e74bcf1f60a5..dc7f7d06bfeb 100644 --- a/toolchain/check/testdata/if_expr/fail_not_in_function.carbon +++ b/toolchain/check/testdata/if_expr/fail_not_in_function.carbon @@ -137,7 +137,7 @@ fn F() { // CHECK:STDOUT: %true: bool = bool_literal true [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @C.as.Destroy.impl(.inst17.loc4_14: type) { +// CHECK:STDOUT: generic impl @C.as.Destroy.impl(.inst18.loc4_14: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness @C.%Destroy.impl_witness_table, @C.as.Destroy.impl(%T) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness)] // CHECK:STDOUT: @@ -165,7 +165,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(.inst17.loc4_14: type) { +// CHECK:STDOUT: generic class @C(.inst18.loc4_14: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -184,7 +184,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, .inst22.loc4_24 [concrete = constants.%C.generic] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, .inst23.loc4_24 [concrete = constants.%C.generic] // CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: if %true br !if.expr.then else br !if.expr.else // CHECK:STDOUT: complete_type_witness = invalid @@ -194,7 +194,7 @@ fn F() { // CHECK:STDOUT: .C = // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @C.as.Destroy.impl.Op(.inst17.loc4_14: type) { +// CHECK:STDOUT: generic fn @C.as.Destroy.impl.Op(.inst18.loc4_14: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C)] // CHECK:STDOUT: %ptr: type = ptr_type %C [symbolic = %ptr (constants.%ptr.7d2)] diff --git a/toolchain/check/testdata/impl/compound.carbon b/toolchain/check/testdata/impl/compound.carbon index ba6fd564d2d1..ad9c756a8622 100644 --- a/toolchain/check/testdata/impl/compound.carbon +++ b/toolchain/check/testdata/impl/compound.carbon @@ -343,11 +343,11 @@ fn InstanceCallFail() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//default, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)] -// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst25 [no loc], unloaded +// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst26 [no loc], unloaded // CHECK:STDOUT: %Core.import_ref.492: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ca0) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.dc0)] // CHECK:STDOUT: %Core.Convert = import_ref Core//default, Convert, unloaded // CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)] -// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst25 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)] +// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst26 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)] // CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%ImplicitAs.Convert.type (%ImplicitAs.Convert.type.275) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%ImplicitAs.Convert (constants.%ImplicitAs.Convert.42e)] // CHECK:STDOUT: %Core.import_ref.207 = import_ref Core//default, loc4_35, unloaded // CHECK:STDOUT: } @@ -525,11 +525,11 @@ fn InstanceCallFail() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//default, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)] -// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst25 [no loc], unloaded +// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst26 [no loc], unloaded // CHECK:STDOUT: %Core.import_ref.492: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ca0) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.dc0)] // CHECK:STDOUT: %Core.Convert = import_ref Core//default, Convert, unloaded // CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)] -// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst25 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)] +// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst26 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)] // CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%ImplicitAs.Convert.type (%ImplicitAs.Convert.type.275) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%ImplicitAs.Convert (constants.%ImplicitAs.Convert.42e)] // CHECK:STDOUT: %Core.import_ref.207 = import_ref Core//default, loc4_35, unloaded // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/import_builtin_call.carbon b/toolchain/check/testdata/impl/import_builtin_call.carbon index 352c6644ad77..71df47c99f6a 100644 --- a/toolchain/check/testdata/impl/import_builtin_call.carbon +++ b/toolchain/check/testdata/impl/import_builtin_call.carbon @@ -470,12 +470,12 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %Main.Double: %Double.type = import_ref Main//generic_impl, Double, loaded [concrete = constants.%Double] // CHECK:STDOUT: %Main.import_ref.f1e294.1: Core.IntLiteral = import_ref Main//generic_impl, loc11_13, loaded [symbolic = @MyInt.%N (constants.%N)] // CHECK:STDOUT: %Main.import_ref.9e9: = import_ref Main//generic_impl, loc13_1, loaded [symbolic = @MyInt.%complete_type (constants.%complete_type.a87)] -// CHECK:STDOUT: %Main.import_ref.697 = import_ref Main//generic_impl, inst92 [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.07c = import_ref Main//generic_impl, inst17 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.697 = import_ref Main//generic_impl, inst93 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.07c = import_ref Main//generic_impl, inst18 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.f99: %Add.assoc_type = import_ref Main//generic_impl, loc5_41, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.Op = import_ref Main//generic_impl, Op, unloaded // CHECK:STDOUT: %Main.import_ref.5a3: %Add.Op.type = import_ref Main//generic_impl, loc5_41, loaded [concrete = constants.%Add.Op] -// CHECK:STDOUT: %Main.import_ref.e5e: %Add.type = import_ref Main//generic_impl, inst17 [no loc], loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.e5e: %Add.type = import_ref Main//generic_impl, inst18 [no loc], loaded [symbolic = constants.%Self] // CHECK:STDOUT: %Main.import_ref.9fe: = import_ref Main//generic_impl, loc15_48, loaded [symbolic = @MyInt.as.Add.impl.%Add.impl_witness (constants.%Add.impl_witness.e7c)] // CHECK:STDOUT: %Main.import_ref.f1e294.2: Core.IntLiteral = import_ref Main//generic_impl, loc15_14, loaded [symbolic = @MyInt.as.Add.impl.%N (constants.%N)] // CHECK:STDOUT: %Main.import_ref.719: type = import_ref Main//generic_impl, loc15_39, loaded [symbolic = @MyInt.as.Add.impl.%MyInt (constants.%MyInt.09f)] @@ -1069,7 +1069,7 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %Main.MakeFromClass: %MakeFromClass.type = import_ref Main//convert_symbolic, MakeFromClass, loaded [concrete = constants.%MakeFromClass] // CHECK:STDOUT: %Main.import_ref.85e: %i32.builtin = import_ref Main//convert_symbolic, loc9_9, loaded [symbolic = @Make.%N (constants.%N.987)] // CHECK:STDOUT: %Main.import_ref.b03: = import_ref Main//convert_symbolic, loc14_1, loaded [concrete = constants.%complete_type.f8a] -// CHECK:STDOUT: %Main.import_ref.d11 = import_ref Main//convert_symbolic, inst132 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.d11 = import_ref Main//convert_symbolic, inst133 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.8f7 = import_ref Main//convert_symbolic, loc13_45, unloaded // CHECK:STDOUT: %Main.import_ref.77d: %OtherInt = import_ref Main//convert_symbolic, loc18_18, loaded [symbolic = @MakeFromClass.%N (constants.%N.335)] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/import_compound.carbon b/toolchain/check/testdata/impl/import_compound.carbon index da4364e92141..98f6cbcd05a5 100644 --- a/toolchain/check/testdata/impl/import_compound.carbon +++ b/toolchain/check/testdata/impl/import_compound.carbon @@ -284,15 +284,15 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.import_ref.c55 = import_ref Main//lib, inst19 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.c55 = import_ref Main//lib, inst20 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.e3c: %NonInstance.assoc_type = import_ref Main//lib, loc4_9, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.F = import_ref Main//lib, F, unloaded // CHECK:STDOUT: %Main.import_ref.474: %NonInstance.F.type = import_ref Main//lib, loc4_9, loaded [concrete = constants.%NonInstance.F] -// CHECK:STDOUT: %Main.import_ref.f85: %NonInstance.type = import_ref Main//lib, inst19 [no loc], loaded [symbolic = constants.%Self.73c] +// CHECK:STDOUT: %Main.import_ref.f85: %NonInstance.type = import_ref Main//lib, inst20 [no loc], loaded [symbolic = constants.%Self.73c] // CHECK:STDOUT: %Main.import_ref.a26: = import_ref Main//lib, loc7_30, loaded [concrete = constants.%NonInstance.impl_witness] // CHECK:STDOUT: %Main.import_ref.c9a3b6.1: type = import_ref Main//lib, loc7_13, loaded [concrete = constants.%struct_type.i] // CHECK:STDOUT: %Main.import_ref.ef5: type = import_ref Main//lib, loc7_18, loaded [concrete = constants.%NonInstance.type] -// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst45 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst46 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.f09 = import_ref Main//lib, loc12_21, unloaded // CHECK:STDOUT: %Main.G = import_ref Main//lib, G, unloaded // CHECK:STDOUT: %Main.import_ref.a9f = import_ref Main//lib, loc15_27, unloaded @@ -387,16 +387,16 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.import_ref.c55 = import_ref Main//lib, inst19 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.c55 = import_ref Main//lib, inst20 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.e3c: %NonInstance.assoc_type = import_ref Main//lib, loc4_9, loaded [concrete = constants.%assoc0.8ce] // CHECK:STDOUT: %Main.F = import_ref Main//lib, F, unloaded // CHECK:STDOUT: %Main.import_ref.474: %NonInstance.F.type = import_ref Main//lib, loc4_9, loaded [concrete = constants.%NonInstance.F] -// CHECK:STDOUT: %Main.import_ref.f85: %NonInstance.type = import_ref Main//lib, inst19 [no loc], loaded [symbolic = constants.%Self.73c] +// CHECK:STDOUT: %Main.import_ref.f85: %NonInstance.type = import_ref Main//lib, inst20 [no loc], loaded [symbolic = constants.%Self.73c] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Main.import_ref.eb8 = import_ref Main//lib, loc7_30, unloaded // CHECK:STDOUT: %Main.import_ref.c9a3b6.1: type = import_ref Main//lib, loc7_13, loaded [concrete = constants.%struct_type.i] // CHECK:STDOUT: %Main.import_ref.ef5: type = import_ref Main//lib, loc7_18, loaded [concrete = constants.%NonInstance.type] -// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst45 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst46 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.f09 = import_ref Main//lib, loc12_21, unloaded // CHECK:STDOUT: %Main.G = import_ref Main//lib, G, unloaded // CHECK:STDOUT: %Main.import_ref.a9f = import_ref Main//lib, loc15_27, unloaded @@ -494,16 +494,16 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.import_ref.c55 = import_ref Main//lib, inst19 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.c55 = import_ref Main//lib, inst20 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.e3c: %NonInstance.assoc_type = import_ref Main//lib, loc4_9, loaded [concrete = constants.%assoc0.8ce] // CHECK:STDOUT: %Main.F = import_ref Main//lib, F, unloaded // CHECK:STDOUT: %Main.import_ref.474: %NonInstance.F.type = import_ref Main//lib, loc4_9, loaded [concrete = constants.%NonInstance.F] -// CHECK:STDOUT: %Main.import_ref.f85: %NonInstance.type = import_ref Main//lib, inst19 [no loc], loaded [symbolic = constants.%Self.73c] +// CHECK:STDOUT: %Main.import_ref.f85: %NonInstance.type = import_ref Main//lib, inst20 [no loc], loaded [symbolic = constants.%Self.73c] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Main.import_ref.eb8 = import_ref Main//lib, loc7_30, unloaded // CHECK:STDOUT: %Main.import_ref.c9a3b6.1: type = import_ref Main//lib, loc7_13, loaded [concrete = constants.%struct_type.i] // CHECK:STDOUT: %Main.import_ref.ef5: type = import_ref Main//lib, loc7_18, loaded [concrete = constants.%NonInstance.type] -// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst45 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst46 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.f09 = import_ref Main//lib, loc12_21, unloaded // CHECK:STDOUT: %Main.G = import_ref Main//lib, G, unloaded // CHECK:STDOUT: %Main.import_ref.a9f = import_ref Main//lib, loc15_27, unloaded @@ -612,12 +612,12 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst45 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst46 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.124: %Instance.assoc_type = import_ref Main//lib, loc12_21, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.G = import_ref Main//lib, G, unloaded // CHECK:STDOUT: %Main.import_ref.b4d: %Instance.G.type = import_ref Main//lib, loc12_21, loaded [concrete = constants.%Instance.G] -// CHECK:STDOUT: %Main.import_ref.0d8: %Instance.type = import_ref Main//lib, inst45 [no loc], loaded [symbolic = constants.%Self.cf8] -// CHECK:STDOUT: %Main.import_ref.c55 = import_ref Main//lib, inst19 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.0d8: %Instance.type = import_ref Main//lib, inst46 [no loc], loaded [symbolic = constants.%Self.cf8] +// CHECK:STDOUT: %Main.import_ref.c55 = import_ref Main//lib, inst20 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.49c = import_ref Main//lib, loc4_9, unloaded // CHECK:STDOUT: %Main.F = import_ref Main//lib, F, unloaded // CHECK:STDOUT: %Main.import_ref.eb8 = import_ref Main//lib, loc7_30, unloaded @@ -760,12 +760,12 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst45 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst46 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.124: %Instance.assoc_type = import_ref Main//lib, loc12_21, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.G = import_ref Main//lib, G, unloaded // CHECK:STDOUT: %Main.import_ref.b4d: %Instance.G.type = import_ref Main//lib, loc12_21, loaded [concrete = constants.%Instance.G] -// CHECK:STDOUT: %Main.import_ref.0d8: %Instance.type = import_ref Main//lib, inst45 [no loc], loaded [symbolic = constants.%Self.cf8] -// CHECK:STDOUT: %Main.import_ref.c55 = import_ref Main//lib, inst19 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.0d8: %Instance.type = import_ref Main//lib, inst46 [no loc], loaded [symbolic = constants.%Self.cf8] +// CHECK:STDOUT: %Main.import_ref.c55 = import_ref Main//lib, inst20 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.49c = import_ref Main//lib, loc4_9, unloaded // CHECK:STDOUT: %Main.F = import_ref Main//lib, F, unloaded // CHECK:STDOUT: %Main.import_ref.eb8 = import_ref Main//lib, loc7_30, unloaded diff --git a/toolchain/check/testdata/impl/import_extend_impl.carbon b/toolchain/check/testdata/impl/import_extend_impl.carbon index ff4f82fe2358..3e8d07813ddc 100644 --- a/toolchain/check/testdata/impl/import_extend_impl.carbon +++ b/toolchain/check/testdata/impl/import_extend_impl.carbon @@ -140,9 +140,9 @@ fn G(c: C) { // CHECK:STDOUT: %Main.I = import_ref Main//extend_impl_library, I, unloaded // CHECK:STDOUT: %Main.C: type = import_ref Main//extend_impl_library, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//extend_impl_library, loc12_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//extend_impl_library, inst28 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//extend_impl_library, inst29 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.3019d1.1: type = import_ref Main//extend_impl_library, loc9_18, loaded [concrete = constants.%I.type] -// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//extend_impl_library, inst17 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//extend_impl_library, inst18 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.c44: %I.assoc_type = import_ref Main//extend_impl_library, loc5_9, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.F = import_ref Main//extend_impl_library, F, unloaded // CHECK:STDOUT: %Main.import_ref.e03: %I.F.type = import_ref Main//extend_impl_library, loc5_9, loaded [concrete = constants.%I.F] @@ -151,7 +151,7 @@ fn G(c: C) { // CHECK:STDOUT: %Main.import_ref.3019d1.2: type = import_ref Main//extend_impl_library, loc9_18, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.import_ref.f6d: %C.as.I.impl.F.type = import_ref Main//extend_impl_library, loc10_12, loaded [concrete = constants.%C.as.I.impl.F] // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%Main.import_ref.f6d), @C.as.I.impl [concrete] -// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//extend_impl_library, inst17 [no loc], loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//extend_impl_library, inst18 [no loc], loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/impl/import_generic.carbon b/toolchain/check/testdata/impl/import_generic.carbon index 94099bc57065..7e4f344dcbe2 100644 --- a/toolchain/check/testdata/impl/import_generic.carbon +++ b/toolchain/check/testdata/impl/import_generic.carbon @@ -276,10 +276,10 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %Main.C: type = import_ref Main//import_generic, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.I: %I.type.dac = import_ref Main//import_generic, I, loaded [concrete = constants.%I.generic] // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//import_generic, loc5_13, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.884 = import_ref Main//import_generic, inst31 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.884 = import_ref Main//import_generic, inst32 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.cc6 = import_ref Main//import_generic, loc8_33, unloaded // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//import_generic, loc4_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//import_generic, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//import_generic, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//import_generic, loc8_14, loaded [symbolic = @C.as.I.impl.08450a.1.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.29aca8.1: type = import_ref Main//import_generic, loc8_24, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.4be: type = import_ref Main//import_generic, loc8_32, loaded [symbolic = @C.as.I.impl.08450a.1.%I.type (constants.%I.type.325)] @@ -619,9 +619,9 @@ impl forall [T:! type] D as J(T*) {} // CHECK:STDOUT: %Main.D: type = import_ref Main//import_generic_decl, D, loaded [concrete = constants.%D] // CHECK:STDOUT: %Main.J: %J.type.2b8 = import_ref Main//import_generic_decl, J, loaded [concrete = constants.%J.generic] // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//import_generic_decl, loc5_13, loaded [symbolic = @J.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.ff5 = import_ref Main//import_generic_decl, inst31 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.ff5 = import_ref Main//import_generic_decl, inst32 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//import_generic_decl, loc4_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.cab = import_ref Main//import_generic_decl, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.cab = import_ref Main//import_generic_decl, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//import_generic_decl, loc11_14, loaded [symbolic = @D.as.J.impl.199bba.1.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.aa9f8a.1: type = import_ref Main//import_generic_decl, loc11_24, loaded [concrete = constants.%D] // CHECK:STDOUT: %Main.import_ref.ded: type = import_ref Main//import_generic_decl, loc11_32, loaded [symbolic = @D.as.J.impl.199bba.1.%J.type (constants.%J.type.b72)] diff --git a/toolchain/check/testdata/impl/import_interface_assoc_const.carbon b/toolchain/check/testdata/impl/import_interface_assoc_const.carbon index ff2138480d10..16d49d9e6123 100644 --- a/toolchain/check/testdata/impl/import_interface_assoc_const.carbon +++ b/toolchain/check/testdata/impl/import_interface_assoc_const.carbon @@ -331,12 +331,12 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded -// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//interface, inst17 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//interface, inst18 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.4fb: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.T: type = import_ref Main//interface, T, loaded [concrete = %T] // CHECK:STDOUT: %Main.import_ref.652: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {} -// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//interface, inst17 [no loc], loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//interface, inst18 [no loc], loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -420,12 +420,12 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded -// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//interface, inst17 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//interface, inst18 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.4fb: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.T: type = import_ref Main//interface, T, loaded [concrete = %T] // CHECK:STDOUT: %Main.import_ref.652: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {} -// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//interface, inst17 [no loc], loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//interface, inst18 [no loc], loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -525,12 +525,12 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded -// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//interface, inst17 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//interface, inst18 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.4fb: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.T: type = import_ref Main//interface, T, loaded [concrete = %T] // CHECK:STDOUT: %Main.import_ref.652: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {} -// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//interface, inst17 [no loc], loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//interface, inst18 [no loc], loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -625,12 +625,12 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded -// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//interface, inst17 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//interface, inst18 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.4fb: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.T: type = import_ref Main//interface, T, loaded [concrete = %T] // CHECK:STDOUT: %Main.import_ref.652: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {} -// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//interface, inst17 [no loc], loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//interface, inst18 [no loc], loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -738,7 +738,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %Main.I = import_ref Main//interface, I, unloaded // CHECK:STDOUT: %Main.I3: type = import_ref Main//interface, I3, loaded [concrete = constants.%I3.type] // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded -// CHECK:STDOUT: %Main.import_ref.148 = import_ref Main//interface, inst26 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.148 = import_ref Main//interface, inst27 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.f5f: %I3.assoc_type = import_ref Main//interface, loc6_9, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.import_ref.680: %I3.assoc_type = import_ref Main//interface, loc7_9, loaded [concrete = constants.%assoc1] // CHECK:STDOUT: %Main.import_ref.181: %I3.assoc_type = import_ref Main//interface, loc8_9, loaded [concrete = constants.%assoc2] @@ -747,13 +747,13 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %Main.T3 = import_ref Main//interface, T3, unloaded // CHECK:STDOUT: %Main.import_ref.5fb: type = import_ref Main//interface, loc6_9, loaded [concrete = %T1] // CHECK:STDOUT: %T1: type = assoc_const_decl @T1 [concrete] {} -// CHECK:STDOUT: %Main.import_ref.8a8474.1: %I3.type = import_ref Main//interface, inst26 [no loc], loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.8a8474.1: %I3.type = import_ref Main//interface, inst27 [no loc], loaded [symbolic = constants.%Self] // CHECK:STDOUT: %Main.import_ref.e26: type = import_ref Main//interface, loc7_9, loaded [concrete = %T2] // CHECK:STDOUT: %T2: type = assoc_const_decl @T2 [concrete] {} -// CHECK:STDOUT: %Main.import_ref.8a8474.2: %I3.type = import_ref Main//interface, inst26 [no loc], loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.8a8474.2: %I3.type = import_ref Main//interface, inst27 [no loc], loaded [symbolic = constants.%Self] // CHECK:STDOUT: %Main.import_ref.e32: type = import_ref Main//interface, loc8_9, loaded [concrete = %T3] // CHECK:STDOUT: %T3: type = assoc_const_decl @T3 [concrete] {} -// CHECK:STDOUT: %Main.import_ref.8a8474.3: %I3.type = import_ref Main//interface, inst26 [no loc], loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.8a8474.3: %I3.type = import_ref Main//interface, inst27 [no loc], loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -904,12 +904,12 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded -// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//interface, inst17 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//interface, inst18 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.4fb: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.T: type = import_ref Main//interface, T, loaded [concrete = %T] // CHECK:STDOUT: %Main.import_ref.652: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {} -// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//interface, inst17 [no loc], loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//interface, inst18 [no loc], loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1000,12 +1000,12 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded -// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//interface, inst17 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//interface, inst18 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.4fb: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.T = import_ref Main//interface, T, unloaded // CHECK:STDOUT: %Main.import_ref.652: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {} -// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//interface, inst17 [no loc], loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//interface, inst18 [no loc], loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1093,12 +1093,12 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded -// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//interface, inst17 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//interface, inst18 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.4fb: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.T = import_ref Main//interface, T, unloaded // CHECK:STDOUT: %Main.import_ref.652: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {} -// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//interface, inst17 [no loc], loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//interface, inst18 [no loc], loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1185,12 +1185,12 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded -// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//interface, inst17 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//interface, inst18 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.4fb: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.T = import_ref Main//interface, T, unloaded // CHECK:STDOUT: %Main.import_ref.652: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {} -// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//interface, inst17 [no loc], loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//interface, inst18 [no loc], loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1277,12 +1277,12 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded -// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//interface, inst17 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//interface, inst18 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.4fb: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.T = import_ref Main//interface, T, unloaded // CHECK:STDOUT: %Main.import_ref.652: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {} -// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//interface, inst17 [no loc], loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//interface, inst18 [no loc], loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1371,12 +1371,12 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded -// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//interface, inst17 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//interface, inst18 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.4fb: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.T: type = import_ref Main//interface, T, loaded [concrete = %T] // CHECK:STDOUT: %Main.import_ref.652: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {} -// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//interface, inst17 [no loc], loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//interface, inst18 [no loc], loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1471,12 +1471,12 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %Main.I = import_ref Main//interface, I, unloaded // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded // CHECK:STDOUT: %Main.NonType: type = import_ref Main//interface, NonType, loaded [concrete = constants.%NonType.type] -// CHECK:STDOUT: %Main.import_ref.8b7 = import_ref Main//interface, inst41 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.8b7 = import_ref Main//interface, inst42 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.9fa: %NonType.assoc_type = import_ref Main//interface, loc12_8, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.Y: %struct_type.a.225 = import_ref Main//interface, Y, loaded [concrete = %Y] // CHECK:STDOUT: %Main.import_ref.f3d: %struct_type.a.225 = import_ref Main//interface, loc12_8, loaded [concrete = %Y] // CHECK:STDOUT: %Y: %struct_type.a.225 = assoc_const_decl @Y [concrete] {} -// CHECK:STDOUT: %Main.import_ref.86c: %NonType.type = import_ref Main//interface, inst41 [no loc], loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.86c: %NonType.type = import_ref Main//interface, inst42 [no loc], loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1604,11 +1604,11 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.IF: type = import_ref Main//interface_with_function, IF, loaded [concrete = constants.%IF.type] -// CHECK:STDOUT: %Main.import_ref.a2a = import_ref Main//interface_with_function, inst17 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.a2a = import_ref Main//interface_with_function, inst18 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.f22: %IF.assoc_type = import_ref Main//interface_with_function, loc3_22, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.F: %IF.F.type = import_ref Main//interface_with_function, F, loaded [concrete = constants.%IF.F] // CHECK:STDOUT: %Main.import_ref.4b7: %IF.F.type = import_ref Main//interface_with_function, loc3_22, loaded [concrete = constants.%IF.F] -// CHECK:STDOUT: %Main.import_ref.f57: %IF.type = import_ref Main//interface_with_function, inst17 [no loc], loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.f57: %IF.type = import_ref Main//interface_with_function, inst18 [no loc], loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/impl/import_self.carbon b/toolchain/check/testdata/impl/import_self.carbon index 06c5f616a476..c889fd9a27ce 100644 --- a/toolchain/check/testdata/impl/import_self.carbon +++ b/toolchain/check/testdata/impl/import_self.carbon @@ -150,10 +150,10 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.import_ref.07c = import_ref Main//a, inst19 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.07c = import_ref Main//a, inst20 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.f99: %Add.assoc_type = import_ref Main//a, loc5_41, loaded [concrete = constants.%assoc0.5ca] // CHECK:STDOUT: %Main.Op: %Add.Op.type = import_ref Main//a, Op, loaded [concrete = constants.%Add.Op] -// CHECK:STDOUT: %Main.import_ref.e5e: %Add.type = import_ref Main//a, inst19 [no loc], loaded [symbolic = constants.%Self.b3d] +// CHECK:STDOUT: %Main.import_ref.e5e: %Add.type = import_ref Main//a, inst20 [no loc], loaded [symbolic = constants.%Self.b3d] // CHECK:STDOUT: %Main.import_ref.5a3: %Add.Op.type = import_ref Main//a, loc5_41, loaded [concrete = constants.%Add.Op] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/import_thunk.carbon b/toolchain/check/testdata/impl/import_thunk.carbon index 609a351fd0a5..b934e1569322 100644 --- a/toolchain/check/testdata/impl/import_thunk.carbon +++ b/toolchain/check/testdata/impl/import_thunk.carbon @@ -155,10 +155,10 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Core.import_ref.f99: %Destroy.assoc_type = import_ref Core//prelude/parts/destroy, loc5_28, loaded [concrete = constants.%assoc0] -// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//a, inst19 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//a, inst20 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.507 = import_ref Main//a, loc5_14, unloaded // CHECK:STDOUT: %Main.F: %I.F.type = import_ref Main//a, F, loaded [concrete = constants.%I.F] -// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//a, inst19 [no loc], loaded [symbolic = constants.%Self.826] +// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//a, inst20 [no loc], loaded [symbolic = constants.%Self.826] // CHECK:STDOUT: %Core.import_ref.725: %Destroy.Op.type = import_ref Core//prelude/parts/destroy, loc5_28, loaded [concrete = constants.%Destroy.Op] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -493,16 +493,16 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.eb1c17.1: %empty_tuple.type = import_ref Main//b, loc5_9, loaded [symbolic = @C.%X (constants.%X)] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//b, loc5_18, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %Main.import_ref.572 = import_ref Main//b, inst31 [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//a, inst19 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.572 = import_ref Main//b, inst32 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//a, inst20 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.c44: %I.assoc_type = import_ref Main//a, loc5_14, loaded [concrete = constants.%assoc0.3f3] // CHECK:STDOUT: %Main.F.8b9 = import_ref Main//a, F, unloaded // CHECK:STDOUT: %Main.import_ref.e03: %I.F.type = import_ref Main//a, loc5_14, loaded [concrete = constants.%I.F] -// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//a, inst19 [no loc], loaded [symbolic = constants.%Self.826] +// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//a, inst20 [no loc], loaded [symbolic = constants.%Self.826] // CHECK:STDOUT: %Main.import_ref.404 = import_ref Main//b, loc5_17, unloaded // CHECK:STDOUT: %Main.import_ref.eb1c17.2: %empty_tuple.type = import_ref Main//b, loc5_9, loaded [symbolic = @C.%X (constants.%X)] -// CHECK:STDOUT: %Main.import_ref.dbf7cd.1: type = import_ref Main//b, inst31 [no loc], loaded [symbolic = constants.%C.13320f.1] -// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//b, inst34 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.dbf7cd.1: type = import_ref Main//b, inst32 [no loc], loaded [symbolic = constants.%C.13320f.1] +// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//b, inst35 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.7dd = import_ref Main//b, loc5_17, unloaded // CHECK:STDOUT: %Destroy.impl_witness_table.629 = impl_witness_table (%Main.import_ref.7dd), @C.as.Destroy.impl [concrete] // CHECK:STDOUT: %Main.import_ref.eb1c17.3: %empty_tuple.type = import_ref Main//b, loc5_9, loaded [symbolic = @C.%X (constants.%X)] @@ -515,7 +515,7 @@ fn G() { // CHECK:STDOUT: %Main.import_ref.eb1c17.5: %empty_tuple.type = import_ref Main//b, loc7_14, loaded [symbolic = @C.as.I.impl.%Y (constants.%Y)] // CHECK:STDOUT: %Main.import_ref.eb1c17.6: %empty_tuple.type = import_ref Main//b, loc7_14, loaded [symbolic = @C.as.I.impl.%Y (constants.%Y)] // CHECK:STDOUT: %Main.F.5a8: @C.as.I.impl.%C.as.I.impl.F.type.1 (%C.as.I.impl.F.type.0daaa1.1) = import_ref Main//b, F, loaded [symbolic = @C.as.I.impl.%C.as.I.impl.F.1 (constants.%C.as.I.impl.F.49c1ac.1)] -// CHECK:STDOUT: %Main.import_ref.fcc: @T.as.Destroy.impl.%T.as.Destroy.impl.Op.type (%T.as.Destroy.impl.Op.type.ed4) = import_ref Main//b, inst179 [indirect], loaded [symbolic = @T.as.Destroy.impl.%T.as.Destroy.impl.Op (constants.%T.as.Destroy.impl.Op.486)] +// CHECK:STDOUT: %Main.import_ref.fcc: @T.as.Destroy.impl.%T.as.Destroy.impl.Op.type (%T.as.Destroy.impl.Op.type.ed4) = import_ref Main//b, inst180 [indirect], loaded [symbolic = @T.as.Destroy.impl.%T.as.Destroy.impl.Op (constants.%T.as.Destroy.impl.Op.486)] // CHECK:STDOUT: %Destroy.impl_witness_table.18d = impl_witness_table (%Main.import_ref.fcc), @T.as.Destroy.impl [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/import_use_generic.carbon b/toolchain/check/testdata/impl/import_use_generic.carbon index 017069d308e0..d4c8a946bbff 100644 --- a/toolchain/check/testdata/impl/import_use_generic.carbon +++ b/toolchain/check/testdata/impl/import_use_generic.carbon @@ -215,12 +215,12 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: %Main.I: type = import_ref Main//import_generic, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//import_generic, loc4_9, loaded [symbolic = @C.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//import_generic, loc4_20, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.4c0 = import_ref Main//import_generic, inst24 [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//import_generic, inst31 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.4c0 = import_ref Main//import_generic, inst25 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//import_generic, inst32 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.c44: %I.assoc_type = import_ref Main//import_generic, loc7_9, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.F = import_ref Main//import_generic, F, unloaded // CHECK:STDOUT: %Main.import_ref.e03: %I.F.type = import_ref Main//import_generic, loc7_9, loaded [concrete = constants.%I.F] -// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//import_generic, inst31 [no loc], loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//import_generic, inst32 [no loc], loaded [symbolic = constants.%Self] // CHECK:STDOUT: %Main.import_ref.6ac: = import_ref Main//import_generic, loc10_34, loaded [symbolic = @C.as.I.impl.%I.impl_witness (constants.%I.impl_witness.443)] // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//import_generic, loc10_14, loaded [symbolic = @C.as.I.impl.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.499: type = import_ref Main//import_generic, loc10_27, loaded [symbolic = @C.as.I.impl.%C (constants.%C.f2e)] diff --git a/toolchain/check/testdata/impl/interface_args.carbon b/toolchain/check/testdata/impl/interface_args.carbon index e1a611eae6ee..e08841241540 100644 --- a/toolchain/check/testdata/impl/interface_args.carbon +++ b/toolchain/check/testdata/impl/interface_args.carbon @@ -551,24 +551,24 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.7b0 = import_ref Main//action, loc8_9, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//action, loc8_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//action, inst58 [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.93c: type = import_ref Main//action, inst58 [no loc], loaded [concrete = constants.%A] -// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//action, inst61 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//action, inst59 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.93c: type = import_ref Main//action, inst59 [no loc], loaded [concrete = constants.%A] +// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//action, inst62 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.2d5 = import_ref Main//action, loc8_9, unloaded // CHECK:STDOUT: %Main.import_ref.ae7 = import_ref Main//action, loc9_9, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//action, loc9_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.54a = import_ref Main//action, inst102 [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.bfe: type = import_ref Main//action, inst102 [no loc], loaded [concrete = constants.%B] -// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//action, inst61 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.54a = import_ref Main//action, inst103 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.bfe: type = import_ref Main//action, inst103 [no loc], loaded [concrete = constants.%B] +// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//action, inst62 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.fc3 = import_ref Main//action, loc9_9, unloaded // CHECK:STDOUT: %Main.import_ref.34c = import_ref Main//action, loc10_9, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.3: = import_ref Main//action, loc10_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//action, inst122 [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.c0c: type = import_ref Main//action, inst122 [no loc], loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.cb9298.3: type = import_ref Main//action, inst61 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//action, inst123 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.c0c: type = import_ref Main//action, inst123 [no loc], loaded [concrete = constants.%C] +// CHECK:STDOUT: %Main.import_ref.cb9298.3: type = import_ref Main//action, inst62 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.b3d = import_ref Main//action, loc10_9, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//action, loc4_18, loaded [symbolic = @Action.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.ddc = import_ref Main//action, inst27 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.ddc = import_ref Main//action, inst28 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.c55: @Action.%Action.assoc_type (%Action.assoc_type.32e) = import_ref Main//action, loc5_22, loaded [symbolic = @Action.%assoc0 (constants.%assoc0.f18741.2)] // CHECK:STDOUT: %Main.Op.ae2 = import_ref Main//action, Op, unloaded // CHECK:STDOUT: %Main.import_ref.995: = import_ref Main//action, loc12_21, loaded [concrete = constants.%Action.impl_witness] @@ -576,7 +576,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Main.import_ref.bb2: type = import_ref Main//action, loc12_19, loaded [concrete = constants.%Action.type.cb0] // CHECK:STDOUT: %Main.import_ref.7b5 = import_ref Main//action, loc13_23, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//action, loc4_18, loaded [symbolic = @Action.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.835: @Action.%Action.type (%Action.type.cca) = import_ref Main//action, inst27 [no loc], loaded [symbolic = @Action.%Self (constants.%Self.e98)] +// CHECK:STDOUT: %Main.import_ref.835: @Action.%Action.type (%Action.type.cca) = import_ref Main//action, inst28 [no loc], loaded [symbolic = @Action.%Self (constants.%Self.e98)] // CHECK:STDOUT: %Main.import_ref.0e3753.1 = import_ref Main//action, loc5_22, unloaded // CHECK:STDOUT: %Main.import_ref.1f6: @Action.%Action.Op.type (%Action.Op.type.036) = import_ref Main//action, loc5_22, loaded [symbolic = @Action.%Action.Op (constants.%Action.Op.6ed)] // CHECK:STDOUT: %Main.import_ref.0e3753.2 = import_ref Main//action, loc5_22, unloaded @@ -771,24 +771,24 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.7b0 = import_ref Main//action, loc8_9, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//action, loc8_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//action, inst58 [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.93c: type = import_ref Main//action, inst58 [no loc], loaded [concrete = constants.%A] -// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//action, inst61 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//action, inst59 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.93c: type = import_ref Main//action, inst59 [no loc], loaded [concrete = constants.%A] +// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//action, inst62 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.2d5 = import_ref Main//action, loc8_9, unloaded // CHECK:STDOUT: %Main.import_ref.ae7 = import_ref Main//action, loc9_9, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//action, loc9_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.54a = import_ref Main//action, inst102 [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.bfe: type = import_ref Main//action, inst102 [no loc], loaded [concrete = constants.%B] -// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//action, inst61 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.54a = import_ref Main//action, inst103 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.bfe: type = import_ref Main//action, inst103 [no loc], loaded [concrete = constants.%B] +// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//action, inst62 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.fc3 = import_ref Main//action, loc9_9, unloaded // CHECK:STDOUT: %Main.import_ref.34c = import_ref Main//action, loc10_9, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.3: = import_ref Main//action, loc10_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//action, inst122 [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.c0c: type = import_ref Main//action, inst122 [no loc], loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.cb9298.3: type = import_ref Main//action, inst61 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//action, inst123 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.c0c: type = import_ref Main//action, inst123 [no loc], loaded [concrete = constants.%C] +// CHECK:STDOUT: %Main.import_ref.cb9298.3: type = import_ref Main//action, inst62 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.b3d = import_ref Main//action, loc10_9, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//action, loc4_18, loaded [symbolic = @Action.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.ddc = import_ref Main//action, inst27 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.ddc = import_ref Main//action, inst28 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.c55: @Action.%Action.assoc_type (%Action.assoc_type.32e) = import_ref Main//action, loc5_22, loaded [symbolic = @Action.%assoc0 (constants.%assoc0.f18)] // CHECK:STDOUT: %Main.Op.ae2 = import_ref Main//action, Op, unloaded // CHECK:STDOUT: %Main.import_ref.19c = import_ref Main//action, loc12_21, unloaded @@ -796,7 +796,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Main.import_ref.bb2: type = import_ref Main//action, loc12_19, loaded [concrete = constants.%Action.type.cb0] // CHECK:STDOUT: %Main.import_ref.7b5 = import_ref Main//action, loc13_23, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//action, loc4_18, loaded [symbolic = @Action.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.835: @Action.%Action.type (%Action.type.cca) = import_ref Main//action, inst27 [no loc], loaded [symbolic = @Action.%Self (constants.%Self.e98)] +// CHECK:STDOUT: %Main.import_ref.835: @Action.%Action.type (%Action.type.cca) = import_ref Main//action, inst28 [no loc], loaded [symbolic = @Action.%Self (constants.%Self.e98)] // CHECK:STDOUT: %Main.import_ref.1f6: @Action.%Action.Op.type (%Action.Op.type.036) = import_ref Main//action, loc5_22, loaded [symbolic = @Action.%Action.Op (constants.%Action.Op.6ed)] // CHECK:STDOUT: %Main.import_ref.0e3753.1 = import_ref Main//action, loc5_22, unloaded // CHECK:STDOUT: %Main.import_ref.0e3753.2 = import_ref Main//action, loc5_22, unloaded @@ -1313,18 +1313,18 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.7b0 = import_ref Main//factory, loc11_9, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//factory, loc11_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//factory, inst80 [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.93c: type = import_ref Main//factory, inst80 [no loc], loaded [concrete = constants.%A] -// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//factory, inst83 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//factory, inst81 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.93c: type = import_ref Main//factory, inst81 [no loc], loaded [concrete = constants.%A] +// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//factory, inst84 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.2d5 = import_ref Main//factory, loc11_9, unloaded // CHECK:STDOUT: %Main.import_ref.6c7: = import_ref Main//factory, loc12_9, loaded [concrete = constants.%Destroy.impl_witness.5cf] // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//factory, loc12_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.54a = import_ref Main//factory, inst124 [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.bfe: type = import_ref Main//factory, inst124 [no loc], loaded [concrete = constants.%B] -// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//factory, inst83 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.54a = import_ref Main//factory, inst125 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.bfe: type = import_ref Main//factory, inst125 [no loc], loaded [concrete = constants.%B] +// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//factory, inst84 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.fc3 = import_ref Main//factory, loc12_9, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//factory, loc4_19, loaded [symbolic = @Factory.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.fbb = import_ref Main//factory, inst27 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.fbb = import_ref Main//factory, inst28 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.46c: @Factory.%Factory.assoc_type (%Factory.assoc_type.207) = import_ref Main//factory, loc6_17, loaded [symbolic = @Factory.%assoc0 (constants.%assoc0.46d25f.2)] // CHECK:STDOUT: %Main.import_ref.2e4: @Factory.%Factory.assoc_type (%Factory.assoc_type.207) = import_ref Main//factory, loc8_31, loaded [symbolic = @Factory.%assoc1 (constants.%assoc1.16541d.2)] // CHECK:STDOUT: %Main.Make = import_ref Main//factory, Make, unloaded @@ -1335,10 +1335,10 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Main.import_ref.a27 = import_ref Main//factory, loc15_17, unloaded // CHECK:STDOUT: %Main.import_ref.163 = import_ref Main//factory, loc16_31, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//factory, loc4_19, loaded [symbolic = @Factory.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.91b53a.1: @Factory.%Factory.type (%Factory.type.c96) = import_ref Main//factory, inst27 [no loc], loaded [symbolic = @Factory.%Self (constants.%Self.9ba)] +// CHECK:STDOUT: %Main.import_ref.91b53a.1: @Factory.%Factory.type (%Factory.type.c96) = import_ref Main//factory, inst28 [no loc], loaded [symbolic = @Factory.%Self (constants.%Self.9ba)] // CHECK:STDOUT: %Main.import_ref.21018a.1 = import_ref Main//factory, loc6_17, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.3: type = import_ref Main//factory, loc4_19, loaded [symbolic = @Factory.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.91b53a.2: @Factory.%Factory.type (%Factory.type.c96) = import_ref Main//factory, inst27 [no loc], loaded [symbolic = @Factory.%Self (constants.%Self.9ba)] +// CHECK:STDOUT: %Main.import_ref.91b53a.2: @Factory.%Factory.type (%Factory.type.c96) = import_ref Main//factory, inst28 [no loc], loaded [symbolic = @Factory.%Self (constants.%Self.9ba)] // CHECK:STDOUT: %Main.import_ref.46fc3c.1 = import_ref Main//factory, loc8_31, unloaded // CHECK:STDOUT: %Main.import_ref.1aa: @Factory.%Factory.Make.type (%Factory.Make.type.598) = import_ref Main//factory, loc6_17, loaded [symbolic = @Factory.%Factory.Make (constants.%Factory.Make.737)] // CHECK:STDOUT: %Main.import_ref.5be: @Factory.%Factory.Method.type (%Factory.Method.type.7ee) = import_ref Main//factory, loc8_31, loaded [symbolic = @Factory.%Factory.Method (constants.%Factory.Method.a71)] @@ -1607,18 +1607,18 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.7b0 = import_ref Main//factory, loc11_9, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//factory, loc11_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//factory, inst80 [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.93c: type = import_ref Main//factory, inst80 [no loc], loaded [concrete = constants.%A] -// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//factory, inst83 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//factory, inst81 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.93c: type = import_ref Main//factory, inst81 [no loc], loaded [concrete = constants.%A] +// CHECK:STDOUT: %Main.import_ref.cb9298.1: type = import_ref Main//factory, inst84 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.2d5 = import_ref Main//factory, loc11_9, unloaded // CHECK:STDOUT: %Main.import_ref.ae7 = import_ref Main//factory, loc12_9, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//factory, loc12_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.54a = import_ref Main//factory, inst124 [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.bfe: type = import_ref Main//factory, inst124 [no loc], loaded [concrete = constants.%B] -// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//factory, inst83 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.54a = import_ref Main//factory, inst125 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.bfe: type = import_ref Main//factory, inst125 [no loc], loaded [concrete = constants.%B] +// CHECK:STDOUT: %Main.import_ref.cb9298.2: type = import_ref Main//factory, inst84 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.fc3 = import_ref Main//factory, loc12_9, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//factory, loc4_19, loaded [symbolic = @Factory.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.fbb = import_ref Main//factory, inst27 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.fbb = import_ref Main//factory, inst28 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.46c: @Factory.%Factory.assoc_type (%Factory.assoc_type.207) = import_ref Main//factory, loc6_17, loaded [symbolic = @Factory.%assoc0 (constants.%assoc0.46d)] // CHECK:STDOUT: %Main.import_ref.2e4: @Factory.%Factory.assoc_type (%Factory.assoc_type.207) = import_ref Main//factory, loc8_31, loaded [symbolic = @Factory.%assoc1 (constants.%assoc1.165)] // CHECK:STDOUT: %Main.Make = import_ref Main//factory, Make, unloaded @@ -1629,10 +1629,10 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Main.import_ref.a27 = import_ref Main//factory, loc15_17, unloaded // CHECK:STDOUT: %Main.import_ref.163 = import_ref Main//factory, loc16_31, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//factory, loc4_19, loaded [symbolic = @Factory.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.91b53a.1: @Factory.%Factory.type (%Factory.type.c96) = import_ref Main//factory, inst27 [no loc], loaded [symbolic = @Factory.%Self (constants.%Self.9ba)] +// CHECK:STDOUT: %Main.import_ref.91b53a.1: @Factory.%Factory.type (%Factory.type.c96) = import_ref Main//factory, inst28 [no loc], loaded [symbolic = @Factory.%Self (constants.%Self.9ba)] // CHECK:STDOUT: %Main.import_ref.1aa: @Factory.%Factory.Make.type (%Factory.Make.type.598) = import_ref Main//factory, loc6_17, loaded [symbolic = @Factory.%Factory.Make (constants.%Factory.Make.737)] // CHECK:STDOUT: %Main.import_ref.5ab3ec.3: type = import_ref Main//factory, loc4_19, loaded [symbolic = @Factory.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.91b53a.2: @Factory.%Factory.type (%Factory.type.c96) = import_ref Main//factory, inst27 [no loc], loaded [symbolic = @Factory.%Self (constants.%Self.9ba)] +// CHECK:STDOUT: %Main.import_ref.91b53a.2: @Factory.%Factory.type (%Factory.type.c96) = import_ref Main//factory, inst28 [no loc], loaded [symbolic = @Factory.%Self (constants.%Self.9ba)] // CHECK:STDOUT: %Main.import_ref.5be: @Factory.%Factory.Method.type (%Factory.Method.type.7ee) = import_ref Main//factory, loc8_31, loaded [symbolic = @Factory.%Factory.Method (constants.%Factory.Method.a71)] // CHECK:STDOUT: %Main.import_ref.21018a.1 = import_ref Main//factory, loc6_17, unloaded // CHECK:STDOUT: %Main.import_ref.46fc3c.1 = import_ref Main//factory, loc8_31, unloaded diff --git a/toolchain/check/testdata/impl/lookup/import.carbon b/toolchain/check/testdata/impl/lookup/import.carbon index e28e727b4582..63820a37d0cd 100644 --- a/toolchain/check/testdata/impl/lookup/import.carbon +++ b/toolchain/check/testdata/impl/lookup/import.carbon @@ -427,12 +427,12 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %PackageA.C: type = import_ref PackageA//default, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %PackageA.import_ref.8f2: = import_ref PackageA//default, loc8_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %PackageA.import_ref.2c4 = import_ref PackageA//default, inst43 [no loc], unloaded +// CHECK:STDOUT: %PackageA.import_ref.2c4 = import_ref PackageA//default, inst44 [no loc], unloaded // CHECK:STDOUT: %PackageA.HasF: type = import_ref PackageA//default, HasF, loaded [concrete = constants.%HasF.type] -// CHECK:STDOUT: %PackageA.import_ref.28c = import_ref PackageA//default, inst19 [no loc], unloaded +// CHECK:STDOUT: %PackageA.import_ref.28c = import_ref PackageA//default, inst20 [no loc], unloaded // CHECK:STDOUT: %PackageA.import_ref.c63 = import_ref PackageA//default, loc5_21, unloaded // CHECK:STDOUT: %PackageA.F: %HasF.F.type = import_ref PackageA//default, F, loaded [concrete = constants.%HasF.F] -// CHECK:STDOUT: %PackageA.import_ref.e73: %HasF.type = import_ref PackageA//default, inst19 [no loc], loaded [symbolic = constants.%Self.cf3] +// CHECK:STDOUT: %PackageA.import_ref.e73: %HasF.type = import_ref PackageA//default, inst20 [no loc], loaded [symbolic = constants.%Self.cf3] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -678,16 +678,16 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: } // CHECK:STDOUT: %PackageA.C: type = import_ref PackageA//default, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %PackageA.import_ref.8f2: = import_ref PackageA//default, loc8_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %PackageA.import_ref.2c4 = import_ref PackageA//default, inst43 [no loc], unloaded +// CHECK:STDOUT: %PackageA.import_ref.2c4 = import_ref PackageA//default, inst44 [no loc], unloaded // CHECK:STDOUT: %PackageA.HasF: type = import_ref PackageA//default, HasF, loaded [concrete = constants.%HasF.type] -// CHECK:STDOUT: %PackageA.import_ref.28c = import_ref PackageA//default, inst19 [no loc], unloaded +// CHECK:STDOUT: %PackageA.import_ref.28c = import_ref PackageA//default, inst20 [no loc], unloaded // CHECK:STDOUT: %PackageA.import_ref.b36: %HasF.assoc_type = import_ref PackageA//default, loc5_21, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %PackageA.F = import_ref PackageA//default, F, unloaded // CHECK:STDOUT: %PackageA.import_ref.ab2: %HasF.F.type = import_ref PackageA//default, loc5_21, loaded [concrete = constants.%HasF.F] -// CHECK:STDOUT: %PackageA.import_ref.e73: %HasF.type = import_ref PackageA//default, inst19 [no loc], loaded [symbolic = constants.%Self.cf3] +// CHECK:STDOUT: %PackageA.import_ref.e73: %HasF.type = import_ref PackageA//default, inst20 [no loc], loaded [symbolic = constants.%Self.cf3] // CHECK:STDOUT: %PackageA.import_ref.34c = import_ref PackageA//default, loc8_9, unloaded -// CHECK:STDOUT: %PackageA.import_ref.c0c: type = import_ref PackageA//default, inst43 [no loc], loaded [concrete = constants.%C] -// CHECK:STDOUT: %PackageA.import_ref.cb9: type = import_ref PackageA//default, inst46 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %PackageA.import_ref.c0c: type = import_ref PackageA//default, inst44 [no loc], loaded [concrete = constants.%C] +// CHECK:STDOUT: %PackageA.import_ref.cb9: type = import_ref PackageA//default, inst47 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %PackageA.import_ref.c12: = import_ref PackageA//default, loc11_16, loaded [concrete = constants.%HasF.impl_witness] // CHECK:STDOUT: %PackageA.import_ref.29a: type = import_ref PackageA//default, loc11_6, loaded [concrete = constants.%C] // CHECK:STDOUT: %PackageA.import_ref.e8c: type = import_ref PackageA//default, loc11_11, loaded [concrete = constants.%HasF.type] @@ -811,25 +811,25 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: } // CHECK:STDOUT: %PackageB.D: type = import_ref PackageB//default, D, loaded [concrete = constants.%D] // CHECK:STDOUT: %PackageB.import_ref.8f2: = import_ref PackageB//default, loc10_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %PackageB.import_ref.cab = import_ref PackageB//default, inst45 [no loc], unloaded +// CHECK:STDOUT: %PackageB.import_ref.cab = import_ref PackageB//default, inst46 [no loc], unloaded // CHECK:STDOUT: %PackageA.HasF: type = import_ref PackageA//default, HasF, loaded [concrete = constants.%HasF.type] -// CHECK:STDOUT: %PackageA.import_ref.28c = import_ref PackageA//default, inst19 [no loc], unloaded +// CHECK:STDOUT: %PackageA.import_ref.28c = import_ref PackageA//default, inst20 [no loc], unloaded // CHECK:STDOUT: %PackageA.import_ref.b36: %HasF.assoc_type = import_ref PackageA//default, loc5_21, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %PackageA.F = import_ref PackageA//default, F, unloaded // CHECK:STDOUT: %PackageA.import_ref.ab2: %HasF.F.type = import_ref PackageA//default, loc5_21, loaded [concrete = constants.%HasF.F] -// CHECK:STDOUT: %PackageA.import_ref.e73: %HasF.type = import_ref PackageA//default, inst19 [no loc], loaded [symbolic = constants.%Self.cf3] +// CHECK:STDOUT: %PackageA.import_ref.e73: %HasF.type = import_ref PackageA//default, inst20 [no loc], loaded [symbolic = constants.%Self.cf3] // CHECK:STDOUT: %PackageA.import_ref.34c = import_ref PackageA//default, loc8_9, unloaded // CHECK:STDOUT: %PackageA.import_ref.8f2: = import_ref PackageA//default, loc8_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %PackageA.import_ref.2c4 = import_ref PackageA//default, inst43 [no loc], unloaded -// CHECK:STDOUT: %PackageA.import_ref.c0c: type = import_ref PackageA//default, inst43 [no loc], loaded [concrete = constants.%C] -// CHECK:STDOUT: %PackageA.import_ref.cb9: type = import_ref PackageA//default, inst46 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %PackageA.import_ref.2c4 = import_ref PackageA//default, inst44 [no loc], unloaded +// CHECK:STDOUT: %PackageA.import_ref.c0c: type = import_ref PackageA//default, inst44 [no loc], loaded [concrete = constants.%C] +// CHECK:STDOUT: %PackageA.import_ref.cb9: type = import_ref PackageA//default, inst47 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %PackageA.import_ref.5cd = import_ref PackageA//default, loc11_16, unloaded // CHECK:STDOUT: %PackageA.import_ref.29a: type = import_ref PackageA//default, loc11_6, loaded [concrete = constants.%C] // CHECK:STDOUT: %PackageA.import_ref.e8c: type = import_ref PackageA//default, loc11_11, loaded [concrete = constants.%HasF.type] // CHECK:STDOUT: %PackageB.import_ref.0c3 = import_ref PackageB//default, loc10_9, unloaded -// CHECK:STDOUT: %PackageB.import_ref.4aa: type = import_ref PackageB//default, inst45 [no loc], loaded [concrete = constants.%D] -// CHECK:STDOUT: %PackageB.import_ref.cb9: type = import_ref PackageB//default, inst48 [no loc], loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %PackageB.import_ref.5d8 = import_ref PackageB//default, inst21 [no loc], unloaded +// CHECK:STDOUT: %PackageB.import_ref.4aa: type = import_ref PackageB//default, inst46 [no loc], loaded [concrete = constants.%D] +// CHECK:STDOUT: %PackageB.import_ref.cb9: type = import_ref PackageB//default, inst49 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %PackageB.import_ref.5d8 = import_ref PackageB//default, inst22 [no loc], unloaded // CHECK:STDOUT: %PackageB.import_ref.910 = import_ref PackageB//default, loc7_21, unloaded // CHECK:STDOUT: %PackageB.G = import_ref PackageB//default, G, unloaded // CHECK:STDOUT: %PackageB.import_ref.ea7 = import_ref PackageB//default, loc13_25, unloaded @@ -997,17 +997,17 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: } // CHECK:STDOUT: %PackageA.C: type = import_ref PackageA//default, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %PackageA.import_ref.8f2: = import_ref PackageA//default, loc8_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %PackageA.import_ref.2c4 = import_ref PackageA//default, inst43 [no loc], unloaded +// CHECK:STDOUT: %PackageA.import_ref.2c4 = import_ref PackageA//default, inst44 [no loc], unloaded // CHECK:STDOUT: %PackageB.HasG: type = import_ref PackageB//default, HasG, loaded [concrete = constants.%HasG.type] -// CHECK:STDOUT: %PackageB.import_ref.5d8 = import_ref PackageB//default, inst21 [no loc], unloaded +// CHECK:STDOUT: %PackageB.import_ref.5d8 = import_ref PackageB//default, inst22 [no loc], unloaded // CHECK:STDOUT: %PackageB.import_ref.6c2: %HasG.assoc_type = import_ref PackageB//default, loc7_21, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %PackageB.G = import_ref PackageB//default, G, unloaded // CHECK:STDOUT: %PackageB.import_ref.70a: %HasG.G.type = import_ref PackageB//default, loc7_21, loaded [concrete = constants.%HasG.G] -// CHECK:STDOUT: %PackageB.import_ref.ef5: %HasG.type = import_ref PackageB//default, inst21 [no loc], loaded [symbolic = constants.%Self.fcb] +// CHECK:STDOUT: %PackageB.import_ref.ef5: %HasG.type = import_ref PackageB//default, inst22 [no loc], loaded [symbolic = constants.%Self.fcb] // CHECK:STDOUT: %PackageA.import_ref.34c = import_ref PackageA//default, loc8_9, unloaded -// CHECK:STDOUT: %PackageA.import_ref.c0c: type = import_ref PackageA//default, inst43 [no loc], loaded [concrete = constants.%C] -// CHECK:STDOUT: %PackageA.import_ref.cb9: type = import_ref PackageA//default, inst46 [no loc], loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %PackageA.import_ref.28c = import_ref PackageA//default, inst19 [no loc], unloaded +// CHECK:STDOUT: %PackageA.import_ref.c0c: type = import_ref PackageA//default, inst44 [no loc], loaded [concrete = constants.%C] +// CHECK:STDOUT: %PackageA.import_ref.cb9: type = import_ref PackageA//default, inst47 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %PackageA.import_ref.28c = import_ref PackageA//default, inst20 [no loc], unloaded // CHECK:STDOUT: %PackageA.import_ref.c63 = import_ref PackageA//default, loc5_21, unloaded // CHECK:STDOUT: %PackageA.F = import_ref PackageA//default, F, unloaded // CHECK:STDOUT: %PackageA.import_ref.5cd = import_ref PackageA//default, loc11_16, unloaded @@ -1015,9 +1015,9 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageA.import_ref.e8c: type = import_ref PackageA//default, loc11_11, loaded [concrete = constants.%HasF.type] // CHECK:STDOUT: %PackageB.import_ref.0c3 = import_ref PackageB//default, loc10_9, unloaded // CHECK:STDOUT: %PackageB.import_ref.8f2: = import_ref PackageB//default, loc10_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %PackageB.import_ref.cab = import_ref PackageB//default, inst45 [no loc], unloaded -// CHECK:STDOUT: %PackageB.import_ref.4aa: type = import_ref PackageB//default, inst45 [no loc], loaded [concrete = constants.%D] -// CHECK:STDOUT: %PackageB.import_ref.cb9: type = import_ref PackageB//default, inst48 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %PackageB.import_ref.cab = import_ref PackageB//default, inst46 [no loc], unloaded +// CHECK:STDOUT: %PackageB.import_ref.4aa: type = import_ref PackageB//default, inst46 [no loc], loaded [concrete = constants.%D] +// CHECK:STDOUT: %PackageB.import_ref.cb9: type = import_ref PackageB//default, inst49 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %PackageB.import_ref.1f6: = import_ref PackageB//default, loc13_25, loaded [concrete = constants.%HasG.impl_witness] // CHECK:STDOUT: %PackageB.import_ref.dfb: type = import_ref PackageB//default, loc13_14, loaded [concrete = constants.%C] // CHECK:STDOUT: %PackageB.import_ref.cee586.1: type = import_ref PackageB//default, loc13_20, loaded [concrete = constants.%HasG.type] @@ -1180,23 +1180,23 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: } // CHECK:STDOUT: %PackageB.D: type = import_ref PackageB//default, D, loaded [concrete = constants.%D] // CHECK:STDOUT: %PackageB.import_ref.8f2: = import_ref PackageB//default, loc10_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %PackageB.import_ref.cab = import_ref PackageB//default, inst45 [no loc], unloaded +// CHECK:STDOUT: %PackageB.import_ref.cab = import_ref PackageB//default, inst46 [no loc], unloaded // CHECK:STDOUT: %PackageB.HasG: type = import_ref PackageB//default, HasG, loaded [concrete = constants.%HasG.type] -// CHECK:STDOUT: %PackageB.import_ref.5d8 = import_ref PackageB//default, inst21 [no loc], unloaded +// CHECK:STDOUT: %PackageB.import_ref.5d8 = import_ref PackageB//default, inst22 [no loc], unloaded // CHECK:STDOUT: %PackageB.import_ref.6c2: %HasG.assoc_type = import_ref PackageB//default, loc7_21, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %PackageB.G = import_ref PackageB//default, G, unloaded // CHECK:STDOUT: %PackageB.import_ref.70a: %HasG.G.type = import_ref PackageB//default, loc7_21, loaded [concrete = constants.%HasG.G] -// CHECK:STDOUT: %PackageB.import_ref.ef5: %HasG.type = import_ref PackageB//default, inst21 [no loc], loaded [symbolic = constants.%Self.fcb] +// CHECK:STDOUT: %PackageB.import_ref.ef5: %HasG.type = import_ref PackageB//default, inst22 [no loc], loaded [symbolic = constants.%Self.fcb] // CHECK:STDOUT: %PackageB.import_ref.0c3 = import_ref PackageB//default, loc10_9, unloaded -// CHECK:STDOUT: %PackageB.import_ref.4aa: type = import_ref PackageB//default, inst45 [no loc], loaded [concrete = constants.%D] -// CHECK:STDOUT: %PackageB.import_ref.cb9: type = import_ref PackageB//default, inst48 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %PackageB.import_ref.4aa: type = import_ref PackageB//default, inst46 [no loc], loaded [concrete = constants.%D] +// CHECK:STDOUT: %PackageB.import_ref.cb9: type = import_ref PackageB//default, inst49 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %PackageB.import_ref.ea7 = import_ref PackageB//default, loc13_25, unloaded -// CHECK:STDOUT: %PackageB.import_ref.8db: = import_ref PackageB//default, inst92 [indirect], loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %PackageB.import_ref.6a9 = import_ref PackageB//default, inst93 [indirect], unloaded +// CHECK:STDOUT: %PackageB.import_ref.8db: = import_ref PackageB//default, inst93 [indirect], loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %PackageB.import_ref.6a9 = import_ref PackageB//default, inst94 [indirect], unloaded // CHECK:STDOUT: %PackageB.import_ref.dfb: type = import_ref PackageB//default, loc13_14, loaded [concrete = constants.%C] // CHECK:STDOUT: %PackageB.import_ref.cee586.1: type = import_ref PackageB//default, loc13_20, loaded [concrete = constants.%HasG.type] -// CHECK:STDOUT: %PackageB.import_ref.96f = import_ref PackageB//default, inst118 [indirect], unloaded -// CHECK:STDOUT: %PackageB.import_ref.a0b = import_ref PackageB//default, inst119 [indirect], unloaded +// CHECK:STDOUT: %PackageB.import_ref.96f = import_ref PackageB//default, inst119 [indirect], unloaded +// CHECK:STDOUT: %PackageB.import_ref.a0b = import_ref PackageB//default, inst120 [indirect], unloaded // CHECK:STDOUT: %PackageB.F = import_ref PackageB//default, F, unloaded // CHECK:STDOUT: %PackageB.import_ref.5ba = import_ref PackageB//default, loc18_25, unloaded // CHECK:STDOUT: %PackageB.import_ref.aa9f8a.1: type = import_ref PackageB//default, loc18_6, loaded [concrete = constants.%D] @@ -1441,11 +1441,11 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: import PackageAssociatedInterface//default // CHECK:STDOUT: } // CHECK:STDOUT: %PackageAssociatedInterface.Z: type = import_ref PackageAssociatedInterface//default, Z, loaded [concrete = constants.%Z.type] -// CHECK:STDOUT: %PackageAssociatedInterface.import_ref.f88 = import_ref PackageAssociatedInterface//default, inst19 [no loc], unloaded +// CHECK:STDOUT: %PackageAssociatedInterface.import_ref.f88 = import_ref PackageAssociatedInterface//default, inst20 [no loc], unloaded // CHECK:STDOUT: %PackageAssociatedInterface.import_ref.609: %Z.assoc_type = import_ref PackageAssociatedInterface//default, loc5_21, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %PackageAssociatedInterface.H = import_ref PackageAssociatedInterface//default, H, unloaded // CHECK:STDOUT: %PackageAssociatedInterface.import_ref.250: %Z.H.type = import_ref PackageAssociatedInterface//default, loc5_21, loaded [concrete = constants.%Z.H] -// CHECK:STDOUT: %PackageAssociatedInterface.import_ref.d26: %Z.type = import_ref PackageAssociatedInterface//default, inst19 [no loc], loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %PackageAssociatedInterface.import_ref.d26: %Z.type = import_ref PackageAssociatedInterface//default, inst20 [no loc], loaded [symbolic = constants.%Self] // CHECK:STDOUT: %PackageAssociatedInterface.import_ref.d8c: = import_ref PackageAssociatedInterface//default, loc8_14, loaded [concrete = constants.%Z.impl_witness] // CHECK:STDOUT: %PackageAssociatedInterface.import_ref.e5c: type = import_ref PackageAssociatedInterface//default, loc8_7, loaded [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %PackageAssociatedInterface.import_ref.df1: type = import_ref PackageAssociatedInterface//default, loc8_12, loaded [concrete = constants.%Z.type] @@ -1756,18 +1756,18 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageHasParam.import_ref.5ab3ec.1: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)] // CHECK:STDOUT: %PackageHasParam.import_ref.34c075.1: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] // CHECK:STDOUT: %PackageHasParam.import_ref.8f2: = import_ref PackageHasParam//default, loc4_34, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %PackageHasParam.import_ref.601 = import_ref PackageHasParam//default, inst33 [no loc], unloaded +// CHECK:STDOUT: %PackageHasParam.import_ref.601 = import_ref PackageHasParam//default, inst34 [no loc], unloaded // CHECK:STDOUT: %PackageHasParam.Y: type = import_ref PackageHasParam//default, Y, loaded [concrete = constants.%Y.type] -// CHECK:STDOUT: %PackageHasParam.import_ref.dc1 = import_ref PackageHasParam//default, inst93 [no loc], unloaded +// CHECK:STDOUT: %PackageHasParam.import_ref.dc1 = import_ref PackageHasParam//default, inst94 [no loc], unloaded // CHECK:STDOUT: %PackageHasParam.import_ref.f69: %Y.assoc_type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%assoc0.494] // CHECK:STDOUT: %PackageHasParam.K: %Y.K.type = import_ref PackageHasParam//default, K, loaded [concrete = constants.%Y.K] -// CHECK:STDOUT: %PackageHasParam.import_ref.292: %Y.type = import_ref PackageHasParam//default, inst93 [no loc], loaded [symbolic = constants.%Self.f64] +// CHECK:STDOUT: %PackageHasParam.import_ref.292: %Y.type = import_ref PackageHasParam//default, inst94 [no loc], loaded [symbolic = constants.%Self.f64] // CHECK:STDOUT: %PackageHasParam.import_ref.ce2: %Y.K.type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%Y.K] // CHECK:STDOUT: %PackageHasParam.import_ref.9da = import_ref PackageHasParam//default, loc4_33, unloaded // CHECK:STDOUT: %PackageHasParam.import_ref.5ab3ec.2: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)] // CHECK:STDOUT: %PackageHasParam.import_ref.34c075.2: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] -// CHECK:STDOUT: %PackageHasParam.import_ref.758: type = import_ref PackageHasParam//default, inst33 [no loc], loaded [symbolic = constants.%AnyParam.560] -// CHECK:STDOUT: %PackageHasParam.import_ref.cb9: type = import_ref PackageHasParam//default, inst36 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %PackageHasParam.import_ref.758: type = import_ref PackageHasParam//default, inst34 [no loc], loaded [symbolic = constants.%AnyParam.560] +// CHECK:STDOUT: %PackageHasParam.import_ref.cb9: type = import_ref PackageHasParam//default, inst37 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %PackageHasParam.import_ref.ba8 = import_ref PackageHasParam//default, loc4_33, unloaded // CHECK:STDOUT: %Destroy.impl_witness_table.f0b = impl_witness_table (%PackageHasParam.import_ref.ba8), @AnyParam.as.Destroy.impl [concrete] // CHECK:STDOUT: %PackageHasParam.import_ref.5ab3ec.3: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)] @@ -2055,21 +2055,21 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageHasParam.import_ref.5ab3ec.1: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)] // CHECK:STDOUT: %PackageHasParam.import_ref.34c075.1: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] // CHECK:STDOUT: %PackageHasParam.import_ref.8f2: = import_ref PackageHasParam//default, loc4_34, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %PackageHasParam.import_ref.601 = import_ref PackageHasParam//default, inst33 [no loc], unloaded +// CHECK:STDOUT: %PackageHasParam.import_ref.601 = import_ref PackageHasParam//default, inst34 [no loc], unloaded // CHECK:STDOUT: %PackageGenericInterface.GenericInterface: %GenericInterface.type.0da = import_ref PackageGenericInterface//default, GenericInterface, loaded [concrete = constants.%GenericInterface.generic] // CHECK:STDOUT: %PackageGenericInterface.import_ref.5ab: type = import_ref PackageGenericInterface//default, loc6_28, loaded [symbolic = @GenericInterface.%U (constants.%U)] -// CHECK:STDOUT: %PackageGenericInterface.import_ref.c3b = import_ref PackageGenericInterface//default, inst29 [no loc], unloaded +// CHECK:STDOUT: %PackageGenericInterface.import_ref.c3b = import_ref PackageGenericInterface//default, inst30 [no loc], unloaded // CHECK:STDOUT: %PackageHasParam.Y: type = import_ref PackageHasParam//default, Y, loaded [concrete = constants.%Y.type] -// CHECK:STDOUT: %PackageHasParam.import_ref.dc1 = import_ref PackageHasParam//default, inst93 [no loc], unloaded +// CHECK:STDOUT: %PackageHasParam.import_ref.dc1 = import_ref PackageHasParam//default, inst94 [no loc], unloaded // CHECK:STDOUT: %PackageHasParam.import_ref.f69: %Y.assoc_type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%assoc0.494] // CHECK:STDOUT: %PackageHasParam.K = import_ref PackageHasParam//default, K, unloaded // CHECK:STDOUT: %PackageHasParam.import_ref.ce2: %Y.K.type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%Y.K] -// CHECK:STDOUT: %PackageHasParam.import_ref.292: %Y.type = import_ref PackageHasParam//default, inst93 [no loc], loaded [symbolic = constants.%Self.f64] +// CHECK:STDOUT: %PackageHasParam.import_ref.292: %Y.type = import_ref PackageHasParam//default, inst94 [no loc], loaded [symbolic = constants.%Self.f64] // CHECK:STDOUT: %PackageHasParam.import_ref.9da = import_ref PackageHasParam//default, loc4_33, unloaded // CHECK:STDOUT: %PackageHasParam.import_ref.5ab3ec.2: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)] // CHECK:STDOUT: %PackageHasParam.import_ref.34c075.2: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] -// CHECK:STDOUT: %PackageHasParam.import_ref.758: type = import_ref PackageHasParam//default, inst33 [no loc], loaded [symbolic = constants.%AnyParam.560] -// CHECK:STDOUT: %PackageHasParam.import_ref.cb9: type = import_ref PackageHasParam//default, inst36 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %PackageHasParam.import_ref.758: type = import_ref PackageHasParam//default, inst34 [no loc], loaded [symbolic = constants.%AnyParam.560] +// CHECK:STDOUT: %PackageHasParam.import_ref.cb9: type = import_ref PackageHasParam//default, inst37 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %PackageHasParam.import_ref.ba8 = import_ref PackageHasParam//default, loc4_33, unloaded // CHECK:STDOUT: %Destroy.impl_witness_table.f0b = impl_witness_table (%PackageHasParam.import_ref.ba8), @AnyParam.as.Destroy.impl [concrete] // CHECK:STDOUT: %PackageHasParam.import_ref.5ab3ec.3: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)] @@ -2331,18 +2331,18 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageHasParam.import_ref.5ab3ec.1: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)] // CHECK:STDOUT: %PackageHasParam.import_ref.34c075.1: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] // CHECK:STDOUT: %PackageHasParam.import_ref.8f2: = import_ref PackageHasParam//default, loc4_34, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %PackageHasParam.import_ref.601 = import_ref PackageHasParam//default, inst33 [no loc], unloaded +// CHECK:STDOUT: %PackageHasParam.import_ref.601 = import_ref PackageHasParam//default, inst34 [no loc], unloaded // CHECK:STDOUT: %PackageHasParam.Y: type = import_ref PackageHasParam//default, Y, loaded [concrete = constants.%Y.type] -// CHECK:STDOUT: %PackageHasParam.import_ref.dc1 = import_ref PackageHasParam//default, inst93 [no loc], unloaded +// CHECK:STDOUT: %PackageHasParam.import_ref.dc1 = import_ref PackageHasParam//default, inst94 [no loc], unloaded // CHECK:STDOUT: %PackageHasParam.import_ref.f69: %Y.assoc_type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%assoc0.494] // CHECK:STDOUT: %PackageHasParam.K: %Y.K.type = import_ref PackageHasParam//default, K, loaded [concrete = constants.%Y.K] -// CHECK:STDOUT: %PackageHasParam.import_ref.292: %Y.type = import_ref PackageHasParam//default, inst93 [no loc], loaded [symbolic = constants.%Self.f64] +// CHECK:STDOUT: %PackageHasParam.import_ref.292: %Y.type = import_ref PackageHasParam//default, inst94 [no loc], loaded [symbolic = constants.%Self.f64] // CHECK:STDOUT: %PackageHasParam.import_ref.ce2: %Y.K.type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%Y.K] // CHECK:STDOUT: %PackageHasParam.import_ref.9da = import_ref PackageHasParam//default, loc4_33, unloaded // CHECK:STDOUT: %PackageHasParam.import_ref.5ab3ec.2: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)] // CHECK:STDOUT: %PackageHasParam.import_ref.34c075.2: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] -// CHECK:STDOUT: %PackageHasParam.import_ref.758: type = import_ref PackageHasParam//default, inst33 [no loc], loaded [symbolic = constants.%AnyParam.560] -// CHECK:STDOUT: %PackageHasParam.import_ref.cb9: type = import_ref PackageHasParam//default, inst36 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %PackageHasParam.import_ref.758: type = import_ref PackageHasParam//default, inst34 [no loc], loaded [symbolic = constants.%AnyParam.560] +// CHECK:STDOUT: %PackageHasParam.import_ref.cb9: type = import_ref PackageHasParam//default, inst37 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %PackageHasParam.import_ref.ba8 = import_ref PackageHasParam//default, loc4_33, unloaded // CHECK:STDOUT: %Destroy.impl_witness_table.5b0 = impl_witness_table (%PackageHasParam.import_ref.ba8), @AnyParam.as.Destroy.impl [concrete] // CHECK:STDOUT: %PackageHasParam.import_ref.5ab3ec.3: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)] @@ -2686,30 +2686,30 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageHasParam.import_ref.5ab3ec.1: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)] // CHECK:STDOUT: %PackageHasParam.import_ref.34c075.1: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] // CHECK:STDOUT: %PackageHasParam.import_ref.8f2: = import_ref PackageHasParam//default, loc4_34, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %PackageHasParam.import_ref.601 = import_ref PackageHasParam//default, inst33 [no loc], unloaded +// CHECK:STDOUT: %PackageHasParam.import_ref.601 = import_ref PackageHasParam//default, inst34 [no loc], unloaded // CHECK:STDOUT: %PackageGenericClass.GenericClass: %GenericClass.type = import_ref PackageGenericClass//default, GenericClass, loaded [concrete = constants.%GenericClass.generic] // CHECK:STDOUT: %PackageGenericClass.import_ref.5ab3ec.1: type = import_ref PackageGenericClass//default, loc6_20, loaded [symbolic = @GenericClass.%U (constants.%U)] // CHECK:STDOUT: %PackageGenericClass.import_ref.8f2: = import_ref PackageGenericClass//default, loc6_31, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %PackageGenericClass.import_ref.065 = import_ref PackageGenericClass//default, inst28 [no loc], unloaded +// CHECK:STDOUT: %PackageGenericClass.import_ref.065 = import_ref PackageGenericClass//default, inst29 [no loc], unloaded // CHECK:STDOUT: %PackageHasParam.Y: type = import_ref PackageHasParam//default, Y, loaded [concrete = constants.%Y.type] -// CHECK:STDOUT: %PackageHasParam.import_ref.dc1 = import_ref PackageHasParam//default, inst93 [no loc], unloaded +// CHECK:STDOUT: %PackageHasParam.import_ref.dc1 = import_ref PackageHasParam//default, inst94 [no loc], unloaded // CHECK:STDOUT: %PackageHasParam.import_ref.f69: %Y.assoc_type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%assoc0.494] // CHECK:STDOUT: %PackageHasParam.K = import_ref PackageHasParam//default, K, unloaded // CHECK:STDOUT: %PackageHasParam.import_ref.ce2: %Y.K.type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%Y.K] -// CHECK:STDOUT: %PackageHasParam.import_ref.292: %Y.type = import_ref PackageHasParam//default, inst93 [no loc], loaded [symbolic = constants.%Self.f64] +// CHECK:STDOUT: %PackageHasParam.import_ref.292: %Y.type = import_ref PackageHasParam//default, inst94 [no loc], loaded [symbolic = constants.%Self.f64] // CHECK:STDOUT: %PackageHasParam.import_ref.9da = import_ref PackageHasParam//default, loc4_33, unloaded // CHECK:STDOUT: %PackageHasParam.import_ref.5ab3ec.2: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)] // CHECK:STDOUT: %PackageHasParam.import_ref.34c075.2: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] -// CHECK:STDOUT: %PackageHasParam.import_ref.758: type = import_ref PackageHasParam//default, inst33 [no loc], loaded [symbolic = constants.%AnyParam.560] -// CHECK:STDOUT: %PackageHasParam.import_ref.cb9: type = import_ref PackageHasParam//default, inst36 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %PackageHasParam.import_ref.758: type = import_ref PackageHasParam//default, inst34 [no loc], loaded [symbolic = constants.%AnyParam.560] +// CHECK:STDOUT: %PackageHasParam.import_ref.cb9: type = import_ref PackageHasParam//default, inst37 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %PackageHasParam.import_ref.ba8 = import_ref PackageHasParam//default, loc4_33, unloaded // CHECK:STDOUT: %Destroy.impl_witness_table.f0b = impl_witness_table (%PackageHasParam.import_ref.ba8), @AnyParam.as.Destroy.impl [concrete] // CHECK:STDOUT: %PackageHasParam.import_ref.5ab3ec.3: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)] // CHECK:STDOUT: %PackageHasParam.import_ref.34c075.3: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] // CHECK:STDOUT: %PackageGenericClass.import_ref.877 = import_ref PackageGenericClass//default, loc6_30, unloaded // CHECK:STDOUT: %PackageGenericClass.import_ref.5ab3ec.2: type = import_ref PackageGenericClass//default, loc6_20, loaded [symbolic = @GenericClass.%U (constants.%U)] -// CHECK:STDOUT: %PackageGenericClass.import_ref.594: type = import_ref PackageGenericClass//default, inst28 [no loc], loaded [symbolic = constants.%GenericClass] -// CHECK:STDOUT: %PackageGenericClass.import_ref.cb9: type = import_ref PackageGenericClass//default, inst31 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %PackageGenericClass.import_ref.594: type = import_ref PackageGenericClass//default, inst29 [no loc], loaded [symbolic = constants.%GenericClass] +// CHECK:STDOUT: %PackageGenericClass.import_ref.cb9: type = import_ref PackageGenericClass//default, inst32 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %PackageGenericClass.import_ref.5f2 = import_ref PackageGenericClass//default, loc6_30, unloaded // CHECK:STDOUT: %Destroy.impl_witness_table.c53 = impl_witness_table (%PackageGenericClass.import_ref.5f2), @GenericClass.as.Destroy.impl [concrete] // CHECK:STDOUT: %PackageGenericClass.import_ref.5ab3ec.3: type = import_ref PackageGenericClass//default, loc6_20, loaded [symbolic = @GenericClass.%U (constants.%U)] @@ -3297,29 +3297,29 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %HasExtraInterfaces.C: %C.type = import_ref HasExtraInterfaces//default, C, loaded [concrete = constants.%C.generic] // CHECK:STDOUT: %HasExtraInterfaces.import_ref.5ab3ec.1: type = import_ref HasExtraInterfaces//default, loc13_9, loaded [symbolic = @C.%T (constants.%T)] // CHECK:STDOUT: %HasExtraInterfaces.import_ref.8f2: = import_ref HasExtraInterfaces//default, loc13_20, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.4c0 = import_ref HasExtraInterfaces//default, inst66 [no loc], unloaded +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.4c0 = import_ref HasExtraInterfaces//default, inst67 [no loc], unloaded // CHECK:STDOUT: %HasExtraInterfaces.I: type = import_ref HasExtraInterfaces//default, I, loaded [concrete = constants.%I.type] -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.e5d = import_ref HasExtraInterfaces//default, inst121 [no loc], unloaded +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.e5d = import_ref HasExtraInterfaces//default, inst122 [no loc], unloaded // CHECK:STDOUT: %HasExtraInterfaces.import_ref.be9: %I.assoc_type = import_ref HasExtraInterfaces//default, loc14_33, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %HasExtraInterfaces.F = import_ref HasExtraInterfaces//default, F, unloaded // CHECK:STDOUT: %HasExtraInterfaces.import_ref.d54: %I.F.type = import_ref HasExtraInterfaces//default, loc14_33, loaded [concrete = constants.%I.F] -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.1db: %I.type = import_ref HasExtraInterfaces//default, inst121 [no loc], loaded [symbolic = constants.%Self.013] +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.1db: %I.type = import_ref HasExtraInterfaces//default, inst122 [no loc], loaded [symbolic = constants.%Self.013] // CHECK:STDOUT: %HasExtraInterfaces.import_ref.21a = import_ref HasExtraInterfaces//default, loc13_19, unloaded // CHECK:STDOUT: %HasExtraInterfaces.import_ref.5ab3ec.2: type = import_ref HasExtraInterfaces//default, loc13_9, loaded [symbolic = @C.%T (constants.%T)] -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.499: type = import_ref HasExtraInterfaces//default, inst66 [no loc], loaded [symbolic = constants.%C.c77] -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.cb9: type = import_ref HasExtraInterfaces//default, inst69 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.499: type = import_ref HasExtraInterfaces//default, inst67 [no loc], loaded [symbolic = constants.%C.c77] +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.cb9: type = import_ref HasExtraInterfaces//default, inst70 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %HasExtraInterfaces.import_ref.251 = import_ref HasExtraInterfaces//default, loc13_19, unloaded // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%HasExtraInterfaces.import_ref.251), @C.as.Destroy.impl [concrete] // CHECK:STDOUT: %HasExtraInterfaces.import_ref.5ab3ec.3: type = import_ref HasExtraInterfaces//default, loc13_9, loaded [symbolic = @C.%T (constants.%T)] // CHECK:STDOUT: %HasExtraInterfaces.import_ref.bca = import_ref HasExtraInterfaces//default, loc16_79, unloaded -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.9c8 = import_ref HasExtraInterfaces//default, inst54 [no loc], unloaded -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.dfe = import_ref HasExtraInterfaces//default, inst49 [no loc], unloaded -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.6b6 = import_ref HasExtraInterfaces//default, inst44 [no loc], unloaded -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.576 = import_ref HasExtraInterfaces//default, inst39 [no loc], unloaded -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.0dd = import_ref HasExtraInterfaces//default, inst34 [no loc], unloaded -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.f83 = import_ref HasExtraInterfaces//default, inst29 [no loc], unloaded -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.975 = import_ref HasExtraInterfaces//default, inst24 [no loc], unloaded -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.a3c = import_ref HasExtraInterfaces//default, inst19 [no loc], unloaded +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.9c8 = import_ref HasExtraInterfaces//default, inst55 [no loc], unloaded +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.dfe = import_ref HasExtraInterfaces//default, inst50 [no loc], unloaded +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.6b6 = import_ref HasExtraInterfaces//default, inst45 [no loc], unloaded +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.576 = import_ref HasExtraInterfaces//default, inst40 [no loc], unloaded +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.0dd = import_ref HasExtraInterfaces//default, inst35 [no loc], unloaded +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.f83 = import_ref HasExtraInterfaces//default, inst30 [no loc], unloaded +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.975 = import_ref HasExtraInterfaces//default, inst25 [no loc], unloaded +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.a3c = import_ref HasExtraInterfaces//default, inst20 [no loc], unloaded // CHECK:STDOUT: %HasExtraInterfaces.import_ref.aa8: type = import_ref HasExtraInterfaces//default, loc16_72, loaded [concrete = constants.%C.074] // CHECK:STDOUT: %HasExtraInterfaces.import_ref.301: type = import_ref HasExtraInterfaces//default, loc16_77, loaded [concrete = constants.%I.type] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/lookup/specific_args.carbon b/toolchain/check/testdata/impl/lookup/specific_args.carbon index d9409288b381..8d4ecc8aeeb1 100644 --- a/toolchain/check/testdata/impl/lookup/specific_args.carbon +++ b/toolchain/check/testdata/impl/lookup/specific_args.carbon @@ -218,13 +218,13 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Main.C = import_ref Main//types, C, unloaded // CHECK:STDOUT: %Main.X: type = import_ref Main//types, X, loaded [concrete = constants.%X] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//types, loc7_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.acf = import_ref Main//types, inst67 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.acf = import_ref Main//types, inst68 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.884 = import_ref Main//types, inst25 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.884 = import_ref Main//types, inst26 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.2bb = import_ref Main//types, loc4_43, unloaded // CHECK:STDOUT: %Main.F: @I.%I.F.type (%I.F.type.2ae) = import_ref Main//types, F, loaded [symbolic = @I.%I.F (constants.%I.F.bb2)] // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.38e: @I.%I.type (%I.type.325) = import_ref Main//types, inst25 [no loc], loaded [symbolic = @I.%Self (constants.%Self.209)] +// CHECK:STDOUT: %Main.import_ref.38e: @I.%I.type (%I.type.325) = import_ref Main//types, inst26 [no loc], loaded [symbolic = @I.%Self (constants.%Self.209)] // CHECK:STDOUT: %Main.import_ref.479 = import_ref Main//types, loc4_43, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -386,16 +386,16 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Main.X: type = import_ref Main//types, X, loaded [concrete = constants.%X] // CHECK:STDOUT: %Main.InInterfaceArgs: type = import_ref Main//impl_in_interface_args, InInterfaceArgs, loaded [concrete = constants.%InInterfaceArgs] // CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//types, loc7_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.acf = import_ref Main//types, inst67 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.acf = import_ref Main//types, inst68 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.884 = import_ref Main//types, inst25 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.884 = import_ref Main//types, inst26 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.474: @I.%I.assoc_type (%I.assoc_type.1e5) = import_ref Main//types, loc4_43, loaded [symbolic = @I.%assoc0 (constants.%assoc0.688)] // CHECK:STDOUT: %Main.F = import_ref Main//types, F, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.38e: @I.%I.type (%I.type.325) = import_ref Main//types, inst25 [no loc], loaded [symbolic = @I.%Self (constants.%Self.209)] +// CHECK:STDOUT: %Main.import_ref.38e: @I.%I.type (%I.type.325) = import_ref Main//types, inst26 [no loc], loaded [symbolic = @I.%Self (constants.%Self.209)] // CHECK:STDOUT: %Main.import_ref.e54: @I.%I.F.type (%I.F.type.2ae) = import_ref Main//types, loc4_43, loaded [symbolic = @I.%I.F (constants.%I.F.bb2)] // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//impl_in_interface_args, loc5_24, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.bf8 = import_ref Main//impl_in_interface_args, inst20 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.bf8 = import_ref Main//impl_in_interface_args, inst21 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.479 = import_ref Main//types, loc4_43, unloaded // CHECK:STDOUT: %Main.import_ref.e08: = import_ref Main//impl_in_interface_args, loc7_30, loaded [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %Main.import_ref.956: type = import_ref Main//impl_in_interface_args, loc7_6, loaded [concrete = constants.%X] @@ -551,16 +551,16 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Main.X: type = import_ref Main//types, X, loaded [concrete = constants.%X] // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//types, loc5_9, loaded [symbolic = @C.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//types, loc5_20, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.4c0 = import_ref Main//types, inst61 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.4c0 = import_ref Main//types, inst62 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.884 = import_ref Main//types, inst25 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.884 = import_ref Main//types, inst26 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.2bb = import_ref Main//types, loc4_43, unloaded // CHECK:STDOUT: %Main.F: @I.%I.F.type (%I.F.type.2ae) = import_ref Main//types, F, loaded [symbolic = @I.%I.F (constants.%I.F.bb2)] // CHECK:STDOUT: %Main.import_ref.5ab3ec.3: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.38e: @I.%I.type (%I.type.325) = import_ref Main//types, inst25 [no loc], loaded [symbolic = @I.%Self (constants.%Self.209)] +// CHECK:STDOUT: %Main.import_ref.38e: @I.%I.type (%I.type.325) = import_ref Main//types, inst26 [no loc], loaded [symbolic = @I.%Self (constants.%Self.209)] // CHECK:STDOUT: %Main.import_ref.479 = import_ref Main//types, loc4_43, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//types, loc7_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.acf = import_ref Main//types, inst67 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.acf = import_ref Main//types, inst68 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -750,18 +750,18 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Main.InClassArgs: type = import_ref Main//impl_in_class_args, InClassArgs, loaded [concrete = constants.%InClassArgs] // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//types, loc5_9, loaded [symbolic = @C.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//types, loc5_20, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.4c0 = import_ref Main//types, inst61 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.4c0 = import_ref Main//types, inst62 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//impl_in_class_args, loc5_20, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.683 = import_ref Main//impl_in_class_args, inst20 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.683 = import_ref Main//impl_in_class_args, inst21 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.884 = import_ref Main//types, inst25 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.884 = import_ref Main//types, inst26 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.474: @I.%I.assoc_type (%I.assoc_type.1e5) = import_ref Main//types, loc4_43, loaded [symbolic = @I.%assoc0 (constants.%assoc0.688)] // CHECK:STDOUT: %Main.F = import_ref Main//types, F, unloaded // CHECK:STDOUT: %Main.import_ref.5ab3ec.3: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.38e: @I.%I.type (%I.type.325) = import_ref Main//types, inst25 [no loc], loaded [symbolic = @I.%Self (constants.%Self.209)] +// CHECK:STDOUT: %Main.import_ref.38e: @I.%I.type (%I.type.325) = import_ref Main//types, inst26 [no loc], loaded [symbolic = @I.%Self (constants.%Self.209)] // CHECK:STDOUT: %Main.import_ref.e54: @I.%I.F.type (%I.F.type.2ae) = import_ref Main//types, loc4_43, loaded [symbolic = @I.%I.F (constants.%I.F.bb2)] // CHECK:STDOUT: %Main.import_ref.8f24d3.3: = import_ref Main//types, loc7_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.acf = import_ref Main//types, inst67 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.acf = import_ref Main//types, inst68 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.479 = import_ref Main//types, loc4_43, unloaded // CHECK:STDOUT: %Main.import_ref.a72: = import_ref Main//impl_in_class_args, loc7_29, loaded [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %Main.import_ref.d6e: type = import_ref Main//impl_in_class_args, loc7_19, loaded [concrete = constants.%C.23b] diff --git a/toolchain/check/testdata/impl/lookup/transitive.carbon b/toolchain/check/testdata/impl/lookup/transitive.carbon index d412adc1f54e..3319bf072d58 100644 --- a/toolchain/check/testdata/impl/lookup/transitive.carbon +++ b/toolchain/check/testdata/impl/lookup/transitive.carbon @@ -146,10 +146,10 @@ fn Call() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//i, inst19 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//i, inst20 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.507 = import_ref Main//i, loc4_33, unloaded // CHECK:STDOUT: %Main.F: %I.F.type = import_ref Main//i, F, loaded [concrete = constants.%I.F] -// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//i, inst19 [no loc], loaded [symbolic = constants.%Self.826] +// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//i, inst20 [no loc], loaded [symbolic = constants.%Self.826] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -264,7 +264,7 @@ fn Call() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//c, loc6_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//c, inst20 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//c, inst21 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -333,16 +333,16 @@ fn Call() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.import_ref.8db: = import_ref Main//get, inst23 [indirect], loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//get, inst24 [indirect], unloaded -// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//i, inst19 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.8db: = import_ref Main//get, inst24 [indirect], loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//get, inst25 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//i, inst20 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.c44: %I.assoc_type = import_ref Main//i, loc4_33, loaded [concrete = constants.%assoc0.3f3] // CHECK:STDOUT: %Main.F = import_ref Main//i, F, unloaded // CHECK:STDOUT: %Main.import_ref.e03: %I.F.type = import_ref Main//i, loc4_33, loaded [concrete = constants.%I.F] -// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//i, inst19 [no loc], loaded [symbolic = constants.%Self.826] +// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//i, inst20 [no loc], loaded [symbolic = constants.%Self.826] // CHECK:STDOUT: %Main.import_ref.4c7: = import_ref Main//c, loc6_9, loaded [concrete = constants.%Destroy.impl_witness.0cc] -// CHECK:STDOUT: %Main.import_ref.c0c: type = import_ref Main//c, inst20 [no loc], loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//c, inst23 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Main.import_ref.c0c: type = import_ref Main//c, inst21 [no loc], loaded [concrete = constants.%C] +// CHECK:STDOUT: %Main.import_ref.cb9: type = import_ref Main//c, inst24 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Main.import_ref.f0d: = import_ref Main//c, loc7_13, loaded [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %Main.import_ref.29a: type = import_ref Main//c, loc7_6, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.f50: type = import_ref Main//c, loc7_11, loaded [concrete = constants.%I.type] diff --git a/toolchain/check/testdata/impl/no_definition_in_impl_file.carbon b/toolchain/check/testdata/impl/no_definition_in_impl_file.carbon index bd282410679c..10582e0a3d0c 100644 --- a/toolchain/check/testdata/impl/no_definition_in_impl_file.carbon +++ b/toolchain/check/testdata/impl/no_definition_in_impl_file.carbon @@ -146,7 +146,7 @@ impl () as D; // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.A: type = import_ref Main//decl_in_api_definition_in_impl, A, loaded [concrete = constants.%A.type] -// CHECK:STDOUT: %Main.import_ref.b61 = import_ref Main//decl_in_api_definition_in_impl, inst17 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.b61 = import_ref Main//decl_in_api_definition_in_impl, inst18 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.e5c: type = import_ref Main//decl_in_api_definition_in_impl, loc10_7, loaded [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %Main.import_ref.831: type = import_ref Main//decl_in_api_definition_in_impl, loc10_12, loaded [concrete = constants.%A.type] // CHECK:STDOUT: } @@ -246,7 +246,7 @@ impl () as D; // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.B = import_ref Main//decl_only_in_api, B, unloaded -// CHECK:STDOUT: %Main.import_ref.420 = import_ref Main//decl_only_in_api, inst17 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.420 = import_ref Main//decl_only_in_api, inst18 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.e5c: type = import_ref Main//decl_only_in_api, loc10_7, loaded [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %Main.import_ref.171: type = import_ref Main//decl_only_in_api, loc10_12, loaded [concrete = constants.%B.type] // CHECK:STDOUT: } @@ -309,7 +309,7 @@ impl () as D; // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: type = import_ref Main//decl_in_api_decl_in_impl, C, loaded [concrete = constants.%C.type] -// CHECK:STDOUT: %Main.import_ref.721 = import_ref Main//decl_in_api_decl_in_impl, inst17 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.721 = import_ref Main//decl_in_api_decl_in_impl, inst18 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.e5c: type = import_ref Main//decl_in_api_decl_in_impl, loc10_7, loaded [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %Main.import_ref.653: type = import_ref Main//decl_in_api_decl_in_impl, loc10_12, loaded [concrete = constants.%C.type] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/export_name.carbon b/toolchain/check/testdata/interface/export_name.carbon index debef9bb2fb1..cc4cebdd6f11 100644 --- a/toolchain/check/testdata/interface/export_name.carbon +++ b/toolchain/check/testdata/interface/export_name.carbon @@ -72,7 +72,7 @@ fn UseEmpty(i: I) {} // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.I: type = import_ref Main//base, I, loaded [concrete = constants.%I.type] -// CHECK:STDOUT: %Main.import_ref = import_ref Main//base, inst17 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref = import_ref Main//base, inst18 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -100,7 +100,7 @@ fn UseEmpty(i: I) {} // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.I: type = import_ref Main//export, I, loaded [concrete = constants.%I.type] -// CHECK:STDOUT: %Main.import_ref = import_ref Main//export, inst20 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref = import_ref Main//export, inst21 [indirect], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/interface/fail_assoc_const_not_binding.carbon b/toolchain/check/testdata/interface/fail_assoc_const_not_binding.carbon index 436f948b12a3..e1404ad3fdb2 100644 --- a/toolchain/check/testdata/interface/fail_assoc_const_not_binding.carbon +++ b/toolchain/check/testdata/interface/fail_assoc_const_not_binding.carbon @@ -129,7 +129,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = .inst17 +// CHECK:STDOUT: .Self = .inst18 // CHECK:STDOUT: witness = invalid // CHECK:STDOUT: } // CHECK:STDOUT: @@ -140,7 +140,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = .inst17 +// CHECK:STDOUT: .Self = .inst18 // CHECK:STDOUT: witness = invalid // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/generic_import.carbon b/toolchain/check/testdata/interface/generic_import.carbon index f9287b1cdc56..27c08ddc6965 100644 --- a/toolchain/check/testdata/interface/generic_import.carbon +++ b/toolchain/check/testdata/interface/generic_import.carbon @@ -120,11 +120,11 @@ impl C as AddWith(C) { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.AddWith: %AddWith.type.b35 = import_ref Main//a, AddWith, loaded [concrete = constants.%AddWith.generic] // CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//a, loc4_19, loaded [symbolic = @AddWith.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.476 = import_ref Main//a, inst25 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.476 = import_ref Main//a, inst26 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.c77 = import_ref Main//a, loc5_9, unloaded // CHECK:STDOUT: %Main.F: @AddWith.%AddWith.F.type (%AddWith.F.type.fbc) = import_ref Main//a, F, loaded [symbolic = @AddWith.%AddWith.F (constants.%AddWith.F.be3)] // CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//a, loc4_19, loaded [symbolic = @AddWith.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.5a4: @AddWith.%AddWith.type (%AddWith.type.bc7) = import_ref Main//a, inst25 [no loc], loaded [symbolic = @AddWith.%Self (constants.%Self.deb)] +// CHECK:STDOUT: %Main.import_ref.5a4: @AddWith.%AddWith.type (%AddWith.type.bc7) = import_ref Main//a, inst26 [no loc], loaded [symbolic = @AddWith.%Self (constants.%Self.deb)] // CHECK:STDOUT: %Main.import_ref.0c5 = import_ref Main//a, loc5_9, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/import.carbon b/toolchain/check/testdata/interface/import.carbon index 36e8054173e9..86f54f429130 100644 --- a/toolchain/check/testdata/interface/import.carbon +++ b/toolchain/check/testdata/interface/import.carbon @@ -193,13 +193,13 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: %Main.Basic: type = import_ref Main//a, Basic, loaded [concrete = constants.%Basic.type] // CHECK:STDOUT: %Main.ForwardDeclared: type = import_ref Main//a, ForwardDeclared, loaded [concrete = constants.%ForwardDeclared.type] // CHECK:STDOUT: %Main.f_ref: ref %struct_type.f = import_ref Main//a, f_ref, loaded [concrete = %f_ref.var] -// CHECK:STDOUT: %Main.import_ref.cc0 = import_ref Main//a, inst17 [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.37f = import_ref Main//a, inst22 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.cc0 = import_ref Main//a, inst18 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.37f = import_ref Main//a, inst23 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.3d5: %Basic.assoc_type = import_ref Main//a, loc8_8, loaded [concrete = constants.%assoc0.fee] // CHECK:STDOUT: %Main.import_ref.760: %Basic.assoc_type = import_ref Main//a, loc9_9, loaded [concrete = constants.%assoc1.4ea] // CHECK:STDOUT: %Main.T.44f = import_ref Main//a, T, unloaded // CHECK:STDOUT: %Main.F.eea = import_ref Main//a, F, unloaded -// CHECK:STDOUT: %Main.import_ref.52b = import_ref Main//a, inst37 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.52b = import_ref Main//a, inst38 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.ad1: %ForwardDeclared.assoc_type = import_ref Main//a, loc16_8, loaded [concrete = constants.%assoc0.d40] // CHECK:STDOUT: %Main.import_ref.339: %ForwardDeclared.assoc_type = import_ref Main//a, loc17_9, loaded [concrete = constants.%assoc1.e3d] // CHECK:STDOUT: %Main.T.6ee = import_ref Main//a, T, unloaded diff --git a/toolchain/check/testdata/interface/import_access.carbon b/toolchain/check/testdata/interface/import_access.carbon index 94322dcb036b..ce1786d591fa 100644 --- a/toolchain/check/testdata/interface/import_access.carbon +++ b/toolchain/check/testdata/interface/import_access.carbon @@ -214,7 +214,7 @@ private interface Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Test.Def: type = import_ref Test//def, Def, loaded [concrete = constants.%Def.type] -// CHECK:STDOUT: %Test.import_ref = import_ref Test//def, inst17 [no loc], unloaded +// CHECK:STDOUT: %Test.import_ref = import_ref Test//def, inst18 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -322,7 +322,7 @@ private interface Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Test.ForwardWithDef: type = import_ref Test//forward_with_def, ForwardWithDef, loaded [concrete = constants.%ForwardWithDef.type] -// CHECK:STDOUT: %Test.import_ref = import_ref Test//forward_with_def, inst18 [no loc], unloaded +// CHECK:STDOUT: %Test.import_ref = import_ref Test//forward_with_def, inst19 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/interface/import_interface_decl.carbon b/toolchain/check/testdata/interface/import_interface_decl.carbon index ed506a7a61ac..f44e4c0b17c2 100644 --- a/toolchain/check/testdata/interface/import_interface_decl.carbon +++ b/toolchain/check/testdata/interface/import_interface_decl.carbon @@ -102,7 +102,7 @@ impl library "[[@TEST_NAME]]"; // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.B = import_ref Main//b, B, unloaded -// CHECK:STDOUT: %Main.import_ref.420 = import_ref Main//b, inst17 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.420 = import_ref Main//b, inst18 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.e5c: type = import_ref Main//b, loc7_7, loaded [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %Main.import_ref.171: type = import_ref Main//b, loc7_12, loaded [concrete = constants.%B.type] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/syntactic_merge.carbon b/toolchain/check/testdata/interface/syntactic_merge.carbon index d407c7a83130..fdea2c4013e2 100644 --- a/toolchain/check/testdata/interface/syntactic_merge.carbon +++ b/toolchain/check/testdata/interface/syntactic_merge.carbon @@ -589,7 +589,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %Main.Foo: %Foo.type.5380b8.1 = import_ref Main//two_file, Foo, loaded [concrete = constants.%Foo.generic.ec3175.1] // CHECK:STDOUT: %Main.Bar: %Bar.type.982aac.1 = import_ref Main//two_file, Bar, loaded [concrete = constants.%Bar.generic.4bda5e.1] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//two_file, loc4_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//two_file, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//two_file, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.f97b44.1: %C = import_ref Main//two_file, loc7_15, loaded [symbolic = @Foo.1.%a (constants.%a)] // CHECK:STDOUT: %Main.import_ref.f97b44.2: %C = import_ref Main//two_file, loc8_15, loaded [symbolic = @Bar.1.%a (constants.%a)] // CHECK:STDOUT: } @@ -984,7 +984,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %Main.C: type = import_ref Main//alias_two_file, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.Foo: %Foo.type.5380b8.1 = import_ref Main//alias_two_file, Foo, loaded [concrete = constants.%Foo.generic.ec3175.1] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//alias_two_file, loc4_10, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//alias_two_file, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//alias_two_file, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.f97: %C = import_ref Main//alias_two_file, loc6_15, loaded [symbolic = @Foo.1.%a (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/let/compile_time_bindings.carbon b/toolchain/check/testdata/let/compile_time_bindings.carbon index cd6d6dec565a..f6cd617aea0c 100644 --- a/toolchain/check/testdata/let/compile_time_bindings.carbon +++ b/toolchain/check/testdata/let/compile_time_bindings.carbon @@ -729,12 +729,12 @@ impl i32 as Empty { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .F = %C.F.decl -// CHECK:STDOUT: .x = .inst32.loc14_7 +// CHECK:STDOUT: .x = .inst33.loc14_7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @C.F() -> %empty_tuple.type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: %empty_tuple.type = name_ref x, .inst32.loc14_7 +// CHECK:STDOUT: %x.ref: %empty_tuple.type = name_ref x, .inst33.loc14_7 // CHECK:STDOUT: return %x.ref // 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 7c2fbf7ef402..7e54d908590b 100644 --- a/toolchain/check/testdata/let/fail_missing_value.carbon +++ b/toolchain/check/testdata/let/fail_missing_value.carbon @@ -50,7 +50,7 @@ fn F() { // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .n = .inst44.loc19_5 +// CHECK:STDOUT: .n = .inst45.loc19_5 // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core diff --git a/toolchain/check/testdata/namespace/merging_with_indirections.carbon b/toolchain/check/testdata/namespace/merging_with_indirections.carbon index d3f39cf3ce67..f2da33535e52 100644 --- a/toolchain/check/testdata/namespace/merging_with_indirections.carbon +++ b/toolchain/check/testdata/namespace/merging_with_indirections.carbon @@ -145,7 +145,7 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Other.import_ref.8f2: = import_ref Other//a, loc5_14, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Other.import_ref.ca8 = import_ref Other//a, inst19 [no loc], unloaded +// CHECK:STDOUT: %Other.import_ref.ca8 = import_ref Other//a, inst20 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -249,8 +249,8 @@ fn Run() { // CHECK:STDOUT: import Other//a // CHECK:STDOUT: } // CHECK:STDOUT: %Other.F: %F.type = import_ref Other//b, F, loaded [concrete = constants.%F] -// CHECK:STDOUT: %Other.import_ref.8db: = import_ref Other//b, inst70 [indirect], loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Other.import_ref.bbd = import_ref Other//b, inst71 [indirect], unloaded +// CHECK:STDOUT: %Other.import_ref.8db: = import_ref Other//b, inst71 [indirect], loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %Other.import_ref.bbd = import_ref Other//b, inst72 [indirect], unloaded // CHECK:STDOUT: %Other.NS1: = import_ref Other//b, NS1, loaded // CHECK:STDOUT: %NS1.b9a: = namespace %Other.NS1, [concrete] { // CHECK:STDOUT: .A = %Other.A @@ -260,8 +260,8 @@ fn Run() { // CHECK:STDOUT: %Other.A: type = import_ref Other//a, A, loaded [concrete = constants.%A] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Other.import_ref.af3: = import_ref Other//a, loc5_13, loaded [concrete = constants.%Destroy.impl_witness.90d] -// CHECK:STDOUT: %Other.import_ref.a85: type = import_ref Other//a, inst19 [no loc], loaded [concrete = constants.%A] -// CHECK:STDOUT: %Other.import_ref.cb9: type = import_ref Other//a, inst22 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Other.import_ref.a85: type = import_ref Other//a, inst20 [no loc], loaded [concrete = constants.%A] +// CHECK:STDOUT: %Other.import_ref.cb9: type = import_ref Other//a, inst23 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Other.import_ref.788: %A.as.Destroy.impl.Op.type = import_ref Other//a, loc5_13, loaded [concrete = constants.%A.as.Destroy.impl.Op] // CHECK:STDOUT: %Destroy.impl_witness_table.8a3 = impl_witness_table (%Other.import_ref.788), @A.as.Destroy.impl [concrete] // CHECK:STDOUT: } 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 f99d7abd3a68..2b7d35dbda9a 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 @@ -99,7 +99,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%b.param: bool) -> type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %b.ref: bool = name_ref b, .inst27.loc5_6 +// CHECK:STDOUT: %b.ref: bool = name_ref b, .inst28.loc5_6 // CHECK:STDOUT: if %b.ref br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: @@ -136,7 +136,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%b.param: bool) -> type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %b.ref: bool = name_ref b, .inst27.loc5_6 +// CHECK:STDOUT: %b.ref: bool = name_ref b, .inst28.loc5_6 // CHECK:STDOUT: if %b.ref br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: @@ -182,7 +182,7 @@ fn F() { // CHECK:STDOUT: %false: bool = bool_literal false [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @C.as.Destroy.impl(.inst27.loc4_14: bool) { +// CHECK:STDOUT: generic impl @C.as.Destroy.impl(.inst28.loc4_14: bool) { // CHECK:STDOUT: %B: bool = bind_symbolic_name B, 0 [symbolic = %B (constants.%B.7dd)] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness @C.%Destroy.impl_witness_table, @C.as.Destroy.impl(%B) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness)] // CHECK:STDOUT: @@ -210,7 +210,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(.inst27.loc4_14: bool) { +// CHECK:STDOUT: generic class @C(.inst28.loc4_14: bool) { // CHECK:STDOUT: %B: bool = bind_symbolic_name B, 0 [symbolic = %B (constants.%B.7dd)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -229,7 +229,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, .inst33.loc4_24 [concrete = constants.%C.generic] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, .inst34.loc4_24 [concrete = constants.%C.generic] // CHECK:STDOUT: %true.loc12_20: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: %.loc12: bool = not %true.loc12_20 [concrete = constants.%false] // CHECK:STDOUT: %true.loc12_25: bool = bool_literal true [concrete = constants.%true] @@ -241,7 +241,7 @@ fn F() { // CHECK:STDOUT: .C = // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @C.as.Destroy.impl.Op(.inst27.loc4_14: bool) { +// CHECK:STDOUT: generic fn @C.as.Destroy.impl.Op(.inst28.loc4_14: bool) { // CHECK:STDOUT: %B: bool = bind_symbolic_name B, 0 [symbolic = %B (constants.%B.7dd)] // CHECK:STDOUT: %C: type = class_type @C, @C(%B) [symbolic = %C (constants.%C)] // CHECK:STDOUT: %ptr: type = ptr_type %C [symbolic = %ptr (constants.%ptr.1a8)] diff --git a/toolchain/check/testdata/operators/overloaded/index.carbon b/toolchain/check/testdata/operators/overloaded/index.carbon index 8b91a250f99a..8371942944dc 100644 --- a/toolchain/check/testdata/operators/overloaded/index.carbon +++ b/toolchain/check/testdata/operators/overloaded/index.carbon @@ -109,7 +109,7 @@ fn F() { ()[()]; } // CHECK:STDOUT: } // CHECK:STDOUT: %Core.IndexWith: type = import_ref Core//core_wrong_index_with, IndexWith, loaded [concrete = constants.%IndexWith] // CHECK:STDOUT: %Core.import_ref.8f2: = import_ref Core//core_wrong_index_with, loc4_18, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Core.import_ref.4c7 = import_ref Core//core_wrong_index_with, inst16 [no loc], unloaded +// CHECK:STDOUT: %Core.import_ref.4c7 = import_ref Core//core_wrong_index_with, inst17 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -302,11 +302,11 @@ fn F() { ()[()]; } // CHECK:STDOUT: } // CHECK:STDOUT: %Core.IndexWith: %IndexWith.type.504 = import_ref Core//core_wrong_arg_count, IndexWith, loaded [concrete = constants.%IndexWith.generic] // CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//core_wrong_arg_count, loc4_21, loaded [symbolic = @IndexWith.%SubscriptType (constants.%SubscriptType)] -// CHECK:STDOUT: %Core.import_ref.68a = import_ref Core//core_wrong_arg_count, inst25 [no loc], unloaded +// CHECK:STDOUT: %Core.import_ref.68a = import_ref Core//core_wrong_arg_count, inst26 [no loc], unloaded // CHECK:STDOUT: %Core.import_ref.613: @IndexWith.%IndexWith.assoc_type (%IndexWith.assoc_type.290) = import_ref Core//core_wrong_arg_count, loc5_52, loaded [symbolic = @IndexWith.%assoc0 (constants.%assoc0.e1e)] // CHECK:STDOUT: %Core.At: @IndexWith.%IndexWith.At.type (%IndexWith.At.type.cf4) = import_ref Core//core_wrong_arg_count, At, loaded [symbolic = @IndexWith.%IndexWith.At (constants.%IndexWith.At.281)] // CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//core_wrong_arg_count, loc4_21, loaded [symbolic = @IndexWith.%SubscriptType (constants.%SubscriptType)] -// CHECK:STDOUT: %Core.import_ref.fb5: @IndexWith.%IndexWith.type (%IndexWith.type.bd2) = import_ref Core//core_wrong_arg_count, inst25 [no loc], loaded [symbolic = @IndexWith.%Self (constants.%Self.30a)] +// CHECK:STDOUT: %Core.import_ref.fb5: @IndexWith.%IndexWith.type (%IndexWith.type.bd2) = import_ref Core//core_wrong_arg_count, inst26 [no loc], loaded [symbolic = @IndexWith.%Self (constants.%Self.30a)] // CHECK:STDOUT: %Core.import_ref.e99: @IndexWith.%IndexWith.At.type (%IndexWith.At.type.cf4) = import_ref Core//core_wrong_arg_count, loc5_52, loaded [symbolic = @IndexWith.%IndexWith.At (constants.%IndexWith.At.281)] // CHECK:STDOUT: %Core.import_ref.981 = import_ref Core//core_wrong_arg_count, loc5_52, unloaded // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/packages/cross_package_export.carbon b/toolchain/check/testdata/packages/cross_package_export.carbon index 3f57797fc8a5..59a14033494a 100644 --- a/toolchain/check/testdata/packages/cross_package_export.carbon +++ b/toolchain/check/testdata/packages/cross_package_export.carbon @@ -296,7 +296,7 @@ alias C = Other.C; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Other.C: type = import_ref Other//base, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Other.import_ref.56d: = import_ref Other//base, loc6_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Other.import_ref.2c4 = import_ref Other//base, inst16 [no loc], unloaded +// CHECK:STDOUT: %Other.import_ref.2c4 = import_ref Other//base, inst17 [no loc], unloaded // CHECK:STDOUT: %Other.import_ref.276 = import_ref Other//base, loc5_8, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -328,7 +328,7 @@ alias C = Other.C; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Other.C: type = import_ref Other//base, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Other.import_ref.56d: = import_ref Other//base, loc6_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Other.import_ref.2c4 = import_ref Other//base, inst16 [no loc], unloaded +// CHECK:STDOUT: %Other.import_ref.2c4 = import_ref Other//base, inst17 [no loc], unloaded // CHECK:STDOUT: %Other.import_ref.276 = import_ref Other//base, loc5_8, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -359,9 +359,9 @@ alias C = Other.C; // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Other.C: type = import_ref Other//export_name, C, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Other.import_ref.ad3: = import_ref Other//export_name, inst22 [indirect], loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Other.import_ref.6a9 = import_ref Other//export_name, inst23 [indirect], unloaded -// CHECK:STDOUT: %Other.import_ref.f67 = import_ref Other//export_name, inst24 [indirect], unloaded +// CHECK:STDOUT: %Other.import_ref.ad3: = import_ref Other//export_name, inst23 [indirect], loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %Other.import_ref.6a9 = import_ref Other//export_name, inst24 [indirect], unloaded +// CHECK:STDOUT: %Other.import_ref.f67 = import_ref Other//export_name, inst25 [indirect], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -401,7 +401,7 @@ alias C = Other.C; // CHECK:STDOUT: } // CHECK:STDOUT: %Other.C: type = import_ref Other//base, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Other.import_ref.56d: = import_ref Other//base, loc6_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Other.import_ref.2c4 = import_ref Other//base, inst16 [no loc], unloaded +// CHECK:STDOUT: %Other.import_ref.2c4 = import_ref Other//base, inst17 [no loc], unloaded // CHECK:STDOUT: %Other.import_ref.276 = import_ref Other//base, loc5_8, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -466,7 +466,7 @@ alias C = Other.C; // CHECK:STDOUT: } // CHECK:STDOUT: %Other.C: type = import_ref Other//base, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Other.import_ref.56d: = import_ref Other//base, loc6_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Other.import_ref.2c4 = import_ref Other//base, inst16 [no loc], unloaded +// CHECK:STDOUT: %Other.import_ref.2c4 = import_ref Other//base, inst17 [no loc], unloaded // CHECK:STDOUT: %Other.import_ref.276 = import_ref Other//base, loc5_8, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -531,7 +531,7 @@ alias C = Other.C; // CHECK:STDOUT: } // CHECK:STDOUT: %Other.C: type = import_ref Other//base, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Other.import_ref.56d: = import_ref Other//base, loc6_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Other.import_ref.2c4 = import_ref Other//base, inst16 [no loc], unloaded +// CHECK:STDOUT: %Other.import_ref.2c4 = import_ref Other//base, inst17 [no loc], unloaded // CHECK:STDOUT: %Other.import_ref.276 = import_ref Other//base, loc5_8, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -593,9 +593,9 @@ alias C = Other.C; // CHECK:STDOUT: import Other//export_name // CHECK:STDOUT: } // CHECK:STDOUT: %Other.C: type = import_ref Other//export_name, C, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Other.import_ref.ad3: = import_ref Other//export_name, inst22 [indirect], loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Other.import_ref.6a9 = import_ref Other//export_name, inst23 [indirect], unloaded -// CHECK:STDOUT: %Other.import_ref.f67 = import_ref Other//export_name, inst24 [indirect], unloaded +// CHECK:STDOUT: %Other.import_ref.ad3: = import_ref Other//export_name, inst23 [indirect], loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %Other.import_ref.6a9 = import_ref Other//export_name, inst24 [indirect], unloaded +// CHECK:STDOUT: %Other.import_ref.f67 = import_ref Other//export_name, inst25 [indirect], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -657,9 +657,9 @@ alias C = Other.C; // CHECK:STDOUT: import Other//export_name_copy // CHECK:STDOUT: } // CHECK:STDOUT: %Other.C: type = import_ref Other//export_name, C, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Other.import_ref.ad3: = import_ref Other//export_name, inst22 [indirect], loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Other.import_ref.6a9 = import_ref Other//export_name, inst23 [indirect], unloaded -// CHECK:STDOUT: %Other.import_ref.f67 = import_ref Other//export_name, inst24 [indirect], unloaded +// CHECK:STDOUT: %Other.import_ref.ad3: = import_ref Other//export_name, inst23 [indirect], loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %Other.import_ref.6a9 = import_ref Other//export_name, inst24 [indirect], unloaded +// CHECK:STDOUT: %Other.import_ref.f67 = import_ref Other//export_name, inst25 [indirect], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -720,9 +720,9 @@ alias C = Other.C; // CHECK:STDOUT: import Other//export_name_indirect // CHECK:STDOUT: } // CHECK:STDOUT: %Other.C: type = import_ref Other//export_name_indirect, C, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Other.import_ref.328: = import_ref Other//export_name_indirect, inst22 [indirect], loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Other.import_ref.db8 = import_ref Other//export_name_indirect, inst23 [indirect], unloaded -// CHECK:STDOUT: %Other.import_ref.3ef = import_ref Other//export_name_indirect, inst24 [indirect], unloaded +// CHECK:STDOUT: %Other.import_ref.328: = import_ref Other//export_name_indirect, inst23 [indirect], loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %Other.import_ref.db8 = import_ref Other//export_name_indirect, inst24 [indirect], unloaded +// CHECK:STDOUT: %Other.import_ref.3ef = import_ref Other//export_name_indirect, inst25 [indirect], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -789,9 +789,9 @@ alias C = Other.C; // CHECK:STDOUT: import Other//base // CHECK:STDOUT: } // CHECK:STDOUT: %Other.C: type = import_ref Other//export_name, C, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Other.import_ref.ad3: = import_ref Other//export_name, inst22 [indirect], loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Other.import_ref.6a9 = import_ref Other//export_name, inst23 [indirect], unloaded -// CHECK:STDOUT: %Other.import_ref.f67 = import_ref Other//export_name, inst24 [indirect], unloaded +// CHECK:STDOUT: %Other.import_ref.ad3: = import_ref Other//export_name, inst23 [indirect], loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %Other.import_ref.6a9 = import_ref Other//export_name, inst24 [indirect], unloaded +// CHECK:STDOUT: %Other.import_ref.f67 = import_ref Other//export_name, inst25 [indirect], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -912,9 +912,9 @@ alias C = Other.C; // CHECK:STDOUT: import Other//conflict // CHECK:STDOUT: } // CHECK:STDOUT: %Other.C: type = import_ref Other//export_name, C, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Other.import_ref.ad3: = import_ref Other//export_name, inst22 [indirect], loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Other.import_ref.6a9 = import_ref Other//export_name, inst23 [indirect], unloaded -// CHECK:STDOUT: %Other.import_ref.f67 = import_ref Other//export_name, inst24 [indirect], unloaded +// CHECK:STDOUT: %Other.import_ref.ad3: = import_ref Other//export_name, inst23 [indirect], loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %Other.import_ref.6a9 = import_ref Other//export_name, inst24 [indirect], unloaded +// CHECK:STDOUT: %Other.import_ref.f67 = import_ref Other//export_name, inst25 [indirect], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/packages/export_import.carbon b/toolchain/check/testdata/packages/export_import.carbon index 5bfee703f463..ebc57335cce6 100644 --- a/toolchain/check/testdata/packages/export_import.carbon +++ b/toolchain/check/testdata/packages/export_import.carbon @@ -307,7 +307,7 @@ export Poison; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: type = import_ref Main//base, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.56d: = import_ref Main//base, loc6_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.276 = import_ref Main//base, loc5_8, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -365,7 +365,7 @@ export Poison; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: type = import_ref Main//export_export, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.56d: = import_ref Main//base, loc6_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.276 = import_ref Main//base, loc5_8, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -422,7 +422,7 @@ export Poison; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: type = import_ref Main//base, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.56d: = import_ref Main//base, loc6_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.276 = import_ref Main//base, loc5_8, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -478,7 +478,7 @@ export Poison; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: type = import_ref Main//base, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.56d: = import_ref Main//base, loc6_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.276 = import_ref Main//base, loc5_8, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -534,7 +534,7 @@ export Poison; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: type = import_ref Main//base, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.56d: = import_ref Main//base, loc6_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.276 = import_ref Main//base, loc5_8, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -590,7 +590,7 @@ export Poison; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: type = import_ref Main//base, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.56d: = import_ref Main//base, loc6_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.276 = import_ref Main//base, loc5_8, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -646,7 +646,7 @@ export Poison; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: type = import_ref Main//base, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.56d: = import_ref Main//base, loc6_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.276 = import_ref Main//base, loc5_8, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -702,7 +702,7 @@ export Poison; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: type = import_ref Main//base, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.56d: = import_ref Main//base, loc6_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.276 = import_ref Main//base, loc5_8, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -770,7 +770,7 @@ export Poison; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: type = import_ref Main//base, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.56d: = import_ref Main//base, loc6_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.276 = import_ref Main//base, loc5_8, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -827,7 +827,7 @@ export Poison; // CHECK:STDOUT: %Main.c = import_ref Main//use_non_export_then_base, c, unloaded // CHECK:STDOUT: %Main.C: type = import_ref Main//base, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.56d: = import_ref Main//base, loc6_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.276 = import_ref Main//base, loc5_8, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/packages/export_mixed.carbon b/toolchain/check/testdata/packages/export_mixed.carbon index 8152ae112fa8..6e916e3f1a57 100644 --- a/toolchain/check/testdata/packages/export_mixed.carbon +++ b/toolchain/check/testdata/packages/export_mixed.carbon @@ -195,7 +195,7 @@ var d: D = {.y = ()}; // CHECK:STDOUT: %Main.C: type = import_ref Main//base, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.D = import_ref Main//base, D, unloaded // CHECK:STDOUT: %Main.import_ref.56d: = import_ref Main//base, loc6_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.276 = import_ref Main//base, loc5_8, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -229,7 +229,7 @@ var d: D = {.y = ()}; // CHECK:STDOUT: %Main.C: type = import_ref Main//base, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.D = import_ref Main//base, D, unloaded // CHECK:STDOUT: %Main.import_ref.56d: = import_ref Main//base, loc6_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.276 = import_ref Main//base, loc5_8, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -278,9 +278,9 @@ var d: D = {.y = ()}; // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: type = import_ref Main//export_import_then_name, C, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.ad3: = import_ref Main//export_import_then_name, inst23 [indirect], loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//export_import_then_name, inst24 [indirect], unloaded -// CHECK:STDOUT: %Main.import_ref.f67 = import_ref Main//export_import_then_name, inst25 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.ad3: = import_ref Main//export_import_then_name, inst24 [indirect], loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//export_import_then_name, inst25 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.f67 = import_ref Main//export_import_then_name, inst26 [indirect], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -334,9 +334,9 @@ var d: D = {.y = ()}; // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: type = import_ref Main//export_name, C, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.ad3: = import_ref Main//export_name, inst23 [indirect], loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//export_name, inst24 [indirect], unloaded -// CHECK:STDOUT: %Main.import_ref.f67 = import_ref Main//export_name, inst25 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.ad3: = import_ref Main//export_name, inst24 [indirect], loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//export_name, inst25 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.f67 = import_ref Main//export_name, inst26 [indirect], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -390,9 +390,9 @@ var d: D = {.y = ()}; // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: type = import_ref Main//export_import_then_name, C, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.ad3: = import_ref Main//export_import_then_name, inst23 [indirect], loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//export_import_then_name, inst24 [indirect], unloaded -// CHECK:STDOUT: %Main.import_ref.f67 = import_ref Main//export_import_then_name, inst25 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.ad3: = import_ref Main//export_import_then_name, inst24 [indirect], loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//export_import_then_name, inst25 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.f67 = import_ref Main//export_import_then_name, inst26 [indirect], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -481,9 +481,9 @@ var d: D = {.y = ()}; // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: type = import_ref Main//export_import_then_name, C, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.ad3: = import_ref Main//export_import_then_name, inst23 [indirect], loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//export_import_then_name, inst24 [indirect], unloaded -// CHECK:STDOUT: %Main.import_ref.f67 = import_ref Main//export_import_then_name, inst25 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.ad3: = import_ref Main//export_import_then_name, inst24 [indirect], loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//export_import_then_name, inst25 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.f67 = import_ref Main//export_import_then_name, inst26 [indirect], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -544,11 +544,11 @@ var d: D = {.y = ()}; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: type = import_ref Main//export_import_then_name, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.D: type = import_ref Main//base, D, loaded [concrete = constants.%D] -// CHECK:STDOUT: %Main.import_ref.ad3: = import_ref Main//export_import_then_name, inst23 [indirect], loaded [concrete = constants.%complete_type.9be] -// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//export_import_then_name, inst24 [indirect], unloaded -// CHECK:STDOUT: %Main.import_ref.f67 = import_ref Main//export_import_then_name, inst25 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.ad3: = import_ref Main//export_import_then_name, inst24 [indirect], loaded [concrete = constants.%complete_type.9be] +// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//export_import_then_name, inst25 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.f67 = import_ref Main//export_import_then_name, inst26 [indirect], unloaded // CHECK:STDOUT: %Main.import_ref.5ab: = import_ref Main//base, loc10_1, loaded [concrete = constants.%complete_type.9f4] -// CHECK:STDOUT: %Main.import_ref.cab = import_ref Main//base, inst27 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.cab = import_ref Main//base, inst28 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.950 = import_ref Main//base, loc9_8, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/packages/export_name.carbon b/toolchain/check/testdata/packages/export_name.carbon index 086c740affd0..00c1274b4876 100644 --- a/toolchain/check/testdata/packages/export_name.carbon +++ b/toolchain/check/testdata/packages/export_name.carbon @@ -277,10 +277,10 @@ private export C; // CHECK:STDOUT: } // CHECK:STDOUT: %Main.NSC: type = import_ref Main//base, NSC, loaded [concrete = constants.%NSC] // CHECK:STDOUT: %Main.import_ref.56d: = import_ref Main//base, loc6_1, loaded [concrete = constants.%complete_type.9be] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.276 = import_ref Main//base, loc5_8, unloaded // CHECK:STDOUT: %Main.import_ref.5ab: = import_ref Main//base, loc11_1, loaded [concrete = constants.%complete_type.9f4] -// CHECK:STDOUT: %Main.import_ref.31c = import_ref Main//base, inst28 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.31c = import_ref Main//base, inst29 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.be6 = import_ref Main//base, loc10_8, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -348,12 +348,12 @@ private export C; // CHECK:STDOUT: .NSC = file.%NSC // CHECK:STDOUT: } // CHECK:STDOUT: %Main.NSC: type = import_ref Main//export, NSC, loaded [concrete = constants.%NSC] -// CHECK:STDOUT: %Main.import_ref.ad3: = import_ref Main//export, inst25 [indirect], loaded [concrete = constants.%complete_type.9be] -// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//export, inst26 [indirect], unloaded -// CHECK:STDOUT: %Main.import_ref.f67 = import_ref Main//export, inst27 [indirect], unloaded -// CHECK:STDOUT: %Main.import_ref.63c: = import_ref Main//export, inst33 [indirect], loaded [concrete = constants.%complete_type.9f4] -// CHECK:STDOUT: %Main.import_ref.f0b = import_ref Main//export, inst34 [indirect], unloaded -// CHECK:STDOUT: %Main.import_ref.ebc = import_ref Main//export, inst35 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.ad3: = import_ref Main//export, inst26 [indirect], loaded [concrete = constants.%complete_type.9be] +// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//export, inst27 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.f67 = import_ref Main//export, inst28 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.63c: = import_ref Main//export, inst34 [indirect], loaded [concrete = constants.%complete_type.9f4] +// CHECK:STDOUT: %Main.import_ref.f0b = import_ref Main//export, inst35 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.ebc = import_ref Main//export, inst36 [indirect], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -414,12 +414,12 @@ private export C; // CHECK:STDOUT: .NSC = %Main.NSC // CHECK:STDOUT: } // CHECK:STDOUT: %Main.NSC: type = import_ref Main//export, NSC, loaded [concrete = constants.%NSC] -// CHECK:STDOUT: %Main.import_ref.ad3: = import_ref Main//export, inst25 [indirect], loaded [concrete = constants.%complete_type.9be] -// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//export, inst26 [indirect], unloaded -// CHECK:STDOUT: %Main.import_ref.f67 = import_ref Main//export, inst27 [indirect], unloaded -// CHECK:STDOUT: %Main.import_ref.63c: = import_ref Main//export, inst33 [indirect], loaded [concrete = constants.%complete_type.9f4] -// CHECK:STDOUT: %Main.import_ref.f0b = import_ref Main//export, inst34 [indirect], unloaded -// CHECK:STDOUT: %Main.import_ref.ebc = import_ref Main//export, inst35 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.ad3: = import_ref Main//export, inst26 [indirect], loaded [concrete = constants.%complete_type.9be] +// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//export, inst27 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.f67 = import_ref Main//export, inst28 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.63c: = import_ref Main//export, inst34 [indirect], loaded [concrete = constants.%complete_type.9f4] +// CHECK:STDOUT: %Main.import_ref.f0b = import_ref Main//export, inst35 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.ebc = import_ref Main//export, inst36 [indirect], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -512,12 +512,12 @@ private export C; // CHECK:STDOUT: .NSC = %Main.NSC // CHECK:STDOUT: } // CHECK:STDOUT: %Main.NSC: type = import_ref Main//export_export, NSC, loaded [concrete = constants.%NSC] -// CHECK:STDOUT: %Main.import_ref.328: = import_ref Main//export_export, inst25 [indirect], loaded [concrete = constants.%complete_type.9be] -// CHECK:STDOUT: %Main.import_ref.db8 = import_ref Main//export_export, inst26 [indirect], unloaded -// CHECK:STDOUT: %Main.import_ref.3ef = import_ref Main//export_export, inst27 [indirect], unloaded -// CHECK:STDOUT: %Main.import_ref.c12: = import_ref Main//export_export, inst33 [indirect], loaded [concrete = constants.%complete_type.9f4] -// CHECK:STDOUT: %Main.import_ref.1cb = import_ref Main//export_export, inst34 [indirect], unloaded -// CHECK:STDOUT: %Main.import_ref.b18 = import_ref Main//export_export, inst35 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.328: = import_ref Main//export_export, inst26 [indirect], loaded [concrete = constants.%complete_type.9be] +// CHECK:STDOUT: %Main.import_ref.db8 = import_ref Main//export_export, inst27 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.3ef = import_ref Main//export_export, inst28 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.c12: = import_ref Main//export_export, inst34 [indirect], loaded [concrete = constants.%complete_type.9f4] +// CHECK:STDOUT: %Main.import_ref.1cb = import_ref Main//export_export, inst35 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.b18 = import_ref Main//export_export, inst36 [indirect], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -611,12 +611,12 @@ private export C; // CHECK:STDOUT: .NSC = %Main.NSC // CHECK:STDOUT: } // CHECK:STDOUT: %Main.NSC: type = import_ref Main//export_export, NSC, loaded [concrete = constants.%NSC] -// CHECK:STDOUT: %Main.import_ref.328: = import_ref Main//export_export, inst25 [indirect], loaded [concrete = constants.%complete_type.9be] -// CHECK:STDOUT: %Main.import_ref.db8 = import_ref Main//export_export, inst26 [indirect], unloaded -// CHECK:STDOUT: %Main.import_ref.3ef = import_ref Main//export_export, inst27 [indirect], unloaded -// CHECK:STDOUT: %Main.import_ref.c12: = import_ref Main//export_export, inst33 [indirect], loaded [concrete = constants.%complete_type.9f4] -// CHECK:STDOUT: %Main.import_ref.1cb = import_ref Main//export_export, inst34 [indirect], unloaded -// CHECK:STDOUT: %Main.import_ref.b18 = import_ref Main//export_export, inst35 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.328: = import_ref Main//export_export, inst26 [indirect], loaded [concrete = constants.%complete_type.9be] +// CHECK:STDOUT: %Main.import_ref.db8 = import_ref Main//export_export, inst27 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.3ef = import_ref Main//export_export, inst28 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.c12: = import_ref Main//export_export, inst34 [indirect], loaded [concrete = constants.%complete_type.9f4] +// CHECK:STDOUT: %Main.import_ref.1cb = import_ref Main//export_export, inst35 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.b18 = import_ref Main//export_export, inst36 [indirect], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -743,7 +743,7 @@ private export C; // CHECK:STDOUT: } // CHECK:STDOUT: %Main.NSC = import_ref Main//base, NSC, unloaded // CHECK:STDOUT: %Main.import_ref.56d: = import_ref Main//base, loc6_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.276 = import_ref Main//base, loc5_8, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -790,10 +790,10 @@ private export C; // CHECK:STDOUT: } // CHECK:STDOUT: %Main.NSC: type = import_ref Main//base, NSC, loaded [concrete = constants.%NSC] // CHECK:STDOUT: %Main.import_ref.56d: = import_ref Main//base, loc6_1, loaded [concrete = constants.%complete_type.9be] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.276 = import_ref Main//base, loc5_8, unloaded // CHECK:STDOUT: %Main.import_ref.5ab: = import_ref Main//base, loc11_1, loaded [concrete = constants.%complete_type.9f4] -// CHECK:STDOUT: %Main.import_ref.31c = import_ref Main//base, inst28 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.31c = import_ref Main//base, inst29 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.be6 = import_ref Main//base, loc10_8, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -887,12 +887,12 @@ private export C; // CHECK:STDOUT: .NSC = %Main.NSC // CHECK:STDOUT: } // CHECK:STDOUT: %Main.NSC: type = import_ref Main//export, NSC, loaded [concrete = constants.%NSC] -// CHECK:STDOUT: %Main.import_ref.ad3: = import_ref Main//export, inst25 [indirect], loaded [concrete = constants.%complete_type.9be] -// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//export, inst26 [indirect], unloaded -// CHECK:STDOUT: %Main.import_ref.f67 = import_ref Main//export, inst27 [indirect], unloaded -// CHECK:STDOUT: %Main.import_ref.63c: = import_ref Main//export, inst33 [indirect], loaded [concrete = constants.%complete_type.9f4] -// CHECK:STDOUT: %Main.import_ref.f0b = import_ref Main//export, inst34 [indirect], unloaded -// CHECK:STDOUT: %Main.import_ref.ebc = import_ref Main//export, inst35 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.ad3: = import_ref Main//export, inst26 [indirect], loaded [concrete = constants.%complete_type.9be] +// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//export, inst27 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.f67 = import_ref Main//export, inst28 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.63c: = import_ref Main//export, inst34 [indirect], loaded [concrete = constants.%complete_type.9f4] +// CHECK:STDOUT: %Main.import_ref.f0b = import_ref Main//export, inst35 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.ebc = import_ref Main//export, inst36 [indirect], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -993,7 +993,7 @@ private export C; // CHECK:STDOUT: } // CHECK:STDOUT: %Main.NSC = import_ref Main//base, NSC, unloaded // CHECK:STDOUT: %Main.import_ref.56d: = import_ref Main//base, loc6_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.276 = import_ref Main//base, loc5_8, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1029,9 +1029,9 @@ private export C; // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C: type = import_ref Main//repeat_export, C, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.ad3: = import_ref Main//repeat_export, inst25 [indirect], loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//repeat_export, inst26 [indirect], unloaded -// CHECK:STDOUT: %Main.import_ref.f67 = import_ref Main//repeat_export, inst27 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.ad3: = import_ref Main//repeat_export, inst26 [indirect], loaded [concrete = constants.%complete_type] +// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//repeat_export, inst27 [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.f67 = import_ref Main//repeat_export, inst28 [indirect], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1087,7 +1087,7 @@ private export C; // CHECK:STDOUT: } // CHECK:STDOUT: %Main.NSC = import_ref Main//base, NSC, unloaded // CHECK:STDOUT: %Main.import_ref.56d: = import_ref Main//base, loc6_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//base, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.276 = import_ref Main//base, loc5_8, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/packages/fail_export_name_member.carbon b/toolchain/check/testdata/packages/fail_export_name_member.carbon index b9a76ada085d..1c3a0d398612 100644 --- a/toolchain/check/testdata/packages/fail_export_name_member.carbon +++ b/toolchain/check/testdata/packages/fail_export_name_member.carbon @@ -80,7 +80,7 @@ export C.n; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Foo.C: type = import_ref Foo//a, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Foo.import_ref.9fc: = import_ref Foo//a, loc6_1, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Foo.import_ref.2c4 = import_ref Foo//a, inst16 [no loc], unloaded +// CHECK:STDOUT: %Foo.import_ref.2c4 = import_ref Foo//a, inst17 [no loc], unloaded // CHECK:STDOUT: %Foo.import_ref.4cb = import_ref Foo//a, loc5_8, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/packages/implicit_imports_entities.carbon b/toolchain/check/testdata/packages/implicit_imports_entities.carbon index 3ba716ecf2da..d1fa0296e7f8 100644 --- a/toolchain/check/testdata/packages/implicit_imports_entities.carbon +++ b/toolchain/check/testdata/packages/implicit_imports_entities.carbon @@ -346,9 +346,9 @@ import Other library "o1"; // CHECK:STDOUT: %Main.C1: type = import_ref Main//mix_current_package, C1, loaded [concrete = constants.%C1] // CHECK:STDOUT: %Main.C2: type = import_ref Main//c2, C2, loaded [concrete = constants.%C2] // CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//c1, loc4_11, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.eb7 = import_ref Main//c1, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.eb7 = import_ref Main//c1, inst17 [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//c2, loc4_11, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.5b0 = import_ref Main//c2, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.5b0 = import_ref Main//c2, inst17 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -429,7 +429,7 @@ import Other library "o1"; // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.C1: type = import_ref Main//dup_c1, C1, loaded [concrete = constants.%C1] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//c1, loc4_11, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.eb7 = import_ref Main//c1, inst16 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.eb7 = import_ref Main//c1, inst17 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -498,7 +498,7 @@ import Other library "o1"; // CHECK:STDOUT: } // CHECK:STDOUT: %Main.C: type = import_ref Main//use_ns, C, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//ns, loc5_13, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Main.import_ref.2dd = import_ref Main//ns, inst17 [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.2dd = import_ref Main//ns, inst18 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -573,10 +573,10 @@ import Other library "o1"; // CHECK:STDOUT: } // CHECK:STDOUT: %Other.O1: type = import_ref Other//o1, O1, loaded [concrete = constants.%O1] // CHECK:STDOUT: %Other.import_ref.8f24d3.1: = import_ref Other//o1, loc4_11, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Other.import_ref.481 = import_ref Other//o1, inst16 [no loc], unloaded +// CHECK:STDOUT: %Other.import_ref.481 = import_ref Other//o1, inst17 [no loc], unloaded // CHECK:STDOUT: %Other.O2: type = import_ref Other//o2, O2, loaded [concrete = constants.%O2] // CHECK:STDOUT: %Other.import_ref.8f24d3.2: = import_ref Other//o2, loc4_11, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Other.import_ref.2eb = import_ref Other//o2, inst16 [no loc], unloaded +// CHECK:STDOUT: %Other.import_ref.2eb = import_ref Other//o2, inst17 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -669,7 +669,7 @@ import Other library "o1"; // CHECK:STDOUT: } // CHECK:STDOUT: %Other.O1: type = import_ref Other//o1, O1, loaded [concrete = constants.%O1] // CHECK:STDOUT: %Other.import_ref.8f2: = import_ref Other//o1, loc4_11, loaded [concrete = constants.%complete_type] -// CHECK:STDOUT: %Other.import_ref.481 = import_ref Other//o1, inst16 [no loc], unloaded +// CHECK:STDOUT: %Other.import_ref.481 = import_ref Other//o1, inst17 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/return/import_convert_function.carbon b/toolchain/check/testdata/return/import_convert_function.carbon index 4b8f5345167f..8c9fe07e14e2 100644 --- a/toolchain/check/testdata/return/import_convert_function.carbon +++ b/toolchain/check/testdata/return/import_convert_function.carbon @@ -1003,26 +1003,26 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %P.D: type = import_ref P//library, D, loaded [concrete = constants.%D] // CHECK:STDOUT: %P.import_ref.a7d: = import_ref P//library, loc5_35, loaded [concrete = constants.%complete_type.ea0] -// CHECK:STDOUT: %P.import_ref.cab = import_ref P//library, inst107 [no loc], unloaded +// CHECK:STDOUT: %P.import_ref.cab = import_ref P//library, inst108 [no loc], unloaded // CHECK:STDOUT: %P.import_ref.a52 = import_ref P//library, loc5_16, unloaded // CHECK:STDOUT: %P.import_ref.b4a = import_ref P//library, loc5_28, unloaded // CHECK:STDOUT: %P.C: %C.type = import_ref P//library, C, loaded [concrete = constants.%C.generic] // CHECK:STDOUT: %P.import_ref.1b7f13.1: %i32 = import_ref P//library, loc4_9, loaded [symbolic = @C.%N (constants.%N.51e)] // CHECK:STDOUT: %P.import_ref.8f2: = import_ref P//library, loc4_19, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %P.import_ref.f65 = import_ref P//library, inst51 [no loc], unloaded +// CHECK:STDOUT: %P.import_ref.f65 = import_ref P//library, inst52 [no loc], unloaded // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.a5b: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.0f9) = import_ref Core//prelude/parts/int, loc16_39, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f06)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @Core.IntLiteral.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: %P.import_ref.f49 = import_ref P//library, loc4_18, unloaded // CHECK:STDOUT: %P.import_ref.1b7f13.2: %i32 = import_ref P//library, loc4_9, loaded [symbolic = @C.%N (constants.%N.51e)] -// CHECK:STDOUT: %P.import_ref.d6f: type = import_ref P//library, inst51 [no loc], loaded [symbolic = constants.%C.17a] -// CHECK:STDOUT: %P.import_ref.cb9298.1: type = import_ref P//library, inst54 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %P.import_ref.d6f: type = import_ref P//library, inst52 [no loc], loaded [symbolic = constants.%C.17a] +// CHECK:STDOUT: %P.import_ref.cb9298.1: type = import_ref P//library, inst55 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %P.import_ref.4f7 = import_ref P//library, loc4_18, unloaded // CHECK:STDOUT: %Destroy.impl_witness_table.bc6 = impl_witness_table (%P.import_ref.4f7), @C.as.Destroy.impl [concrete] // CHECK:STDOUT: %P.import_ref.1b7f13.3: %i32 = import_ref P//library, loc4_9, loaded [symbolic = @C.%N (constants.%N.51e)] // CHECK:STDOUT: %P.import_ref.7ba: = import_ref P//library, loc5_9, loaded [concrete = constants.%Destroy.impl_witness.d5a] -// CHECK:STDOUT: %P.import_ref.4aa: type = import_ref P//library, inst107 [no loc], loaded [concrete = constants.%D] -// CHECK:STDOUT: %P.import_ref.cb9298.2: type = import_ref P//library, inst54 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %P.import_ref.4aa: type = import_ref P//library, inst108 [no loc], loaded [concrete = constants.%D] +// CHECK:STDOUT: %P.import_ref.cb9298.2: type = import_ref P//library, inst55 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %P.import_ref.708: = import_ref P//library, loc8_33, loaded [concrete = constants.%ImplicitAs.impl_witness.f53] // CHECK:STDOUT: %P.import_ref.d2c: type = import_ref P//library, loc8_9, loaded [concrete = constants.%C.b00] // CHECK:STDOUT: %P.import_ref.b769fa.1: type = import_ref P//library, loc8_31, loaded [concrete = constants.%ImplicitAs.type.5f9] diff --git a/toolchain/check/testdata/struct/import.carbon b/toolchain/check/testdata/struct/import.carbon index a32f05ae24b4..11c0b01a3862 100644 --- a/toolchain/check/testdata/struct/import.carbon +++ b/toolchain/check/testdata/struct/import.carbon @@ -435,15 +435,15 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Implicit.import_ref.773: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.9a6) = import_ref Implicit//default, inst149 [indirect], loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.458)] +// CHECK:STDOUT: %Implicit.import_ref.773: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.9a6) = import_ref Implicit//default, inst150 [indirect], loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.458)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.1ad = impl_witness_table (%Implicit.import_ref.773), @Core.IntLiteral.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: %Implicit.import_ref.48d = import_ref Implicit//default, loc8_33, unloaded // CHECK:STDOUT: %Implicit.import_ref.c81f8f.1: %struct_type.a.b.5ca = import_ref Implicit//default, loc8_9, loaded [symbolic = @C.%S (constants.%S)] // CHECK:STDOUT: %Implicit.import_ref.8f2: = import_ref Implicit//default, loc8_34, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %Implicit.import_ref.b8b = import_ref Implicit//default, inst488 [no loc], unloaded +// CHECK:STDOUT: %Implicit.import_ref.b8b = import_ref Implicit//default, inst489 [no loc], unloaded // CHECK:STDOUT: %Implicit.import_ref.c81f8f.2: %struct_type.a.b.5ca = import_ref Implicit//default, loc8_9, loaded [symbolic = @C.%S (constants.%S)] -// CHECK:STDOUT: %Implicit.import_ref.4cf: type = import_ref Implicit//default, inst488 [no loc], loaded [symbolic = constants.%C.720] -// CHECK:STDOUT: %Implicit.import_ref.cb9: type = import_ref Implicit//default, inst108 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Implicit.import_ref.4cf: type = import_ref Implicit//default, inst489 [no loc], loaded [symbolic = constants.%C.720] +// CHECK:STDOUT: %Implicit.import_ref.cb9: type = import_ref Implicit//default, inst109 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Implicit.import_ref.7f2ca0.1 = import_ref Implicit//default, loc8_33, unloaded // CHECK:STDOUT: %Implicit.import_ref.7f2ca0.2 = import_ref Implicit//default, loc8_33, unloaded // CHECK:STDOUT: %Destroy.impl_witness_table.2ab = impl_witness_table (%Implicit.import_ref.7f2ca0.2), @C.as.Destroy.impl [concrete] @@ -674,10 +674,10 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Implicit.import_ref.48d = import_ref Implicit//default, loc8_33, unloaded // CHECK:STDOUT: %Implicit.import_ref.c81f8f.1: %struct_type.a.b = import_ref Implicit//default, loc8_9, loaded [symbolic = @C.%S (constants.%S)] // CHECK:STDOUT: %Implicit.import_ref.8f2: = import_ref Implicit//default, loc8_34, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %Implicit.import_ref.b8b = import_ref Implicit//default, inst488 [no loc], unloaded +// CHECK:STDOUT: %Implicit.import_ref.b8b = import_ref Implicit//default, inst489 [no loc], unloaded // CHECK:STDOUT: %Implicit.import_ref.c81f8f.2: %struct_type.a.b = import_ref Implicit//default, loc8_9, loaded [symbolic = @C.%S (constants.%S)] -// CHECK:STDOUT: %Implicit.import_ref.4cf: type = import_ref Implicit//default, inst488 [no loc], loaded [symbolic = constants.%C.720] -// CHECK:STDOUT: %Implicit.import_ref.cb9: type = import_ref Implicit//default, inst108 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Implicit.import_ref.4cf: type = import_ref Implicit//default, inst489 [no loc], loaded [symbolic = constants.%C.720] +// CHECK:STDOUT: %Implicit.import_ref.cb9: type = import_ref Implicit//default, inst109 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Implicit.import_ref.7f2ca0.1 = import_ref Implicit//default, loc8_33, unloaded // CHECK:STDOUT: %Implicit.import_ref.7f2ca0.2 = import_ref Implicit//default, loc8_33, unloaded // CHECK:STDOUT: %Destroy.impl_witness_table.2ab = impl_witness_table (%Implicit.import_ref.7f2ca0.2), @C.as.Destroy.impl [concrete] @@ -843,15 +843,15 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Implicit.import_ref.773: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.9a6) = import_ref Implicit//default, inst149 [indirect], loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.458)] +// CHECK:STDOUT: %Implicit.import_ref.773: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.9a6) = import_ref Implicit//default, inst150 [indirect], loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.458)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.1ad = impl_witness_table (%Implicit.import_ref.773), @Core.IntLiteral.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: %Implicit.import_ref.48d = import_ref Implicit//default, loc8_33, unloaded // CHECK:STDOUT: %Implicit.import_ref.c81f8f.1: %struct_type.a.b.5ca = import_ref Implicit//default, loc8_9, loaded [symbolic = @C.%S (constants.%S)] // CHECK:STDOUT: %Implicit.import_ref.8f2: = import_ref Implicit//default, loc8_34, loaded [concrete = constants.%complete_type.357] -// CHECK:STDOUT: %Implicit.import_ref.b8b = import_ref Implicit//default, inst488 [no loc], unloaded +// CHECK:STDOUT: %Implicit.import_ref.b8b = import_ref Implicit//default, inst489 [no loc], unloaded // CHECK:STDOUT: %Implicit.import_ref.c81f8f.2: %struct_type.a.b.5ca = import_ref Implicit//default, loc8_9, loaded [symbolic = @C.%S (constants.%S)] -// CHECK:STDOUT: %Implicit.import_ref.4cf: type = import_ref Implicit//default, inst488 [no loc], loaded [symbolic = constants.%C.720] -// CHECK:STDOUT: %Implicit.import_ref.cb9: type = import_ref Implicit//default, inst108 [no loc], loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Implicit.import_ref.4cf: type = import_ref Implicit//default, inst489 [no loc], loaded [symbolic = constants.%C.720] +// CHECK:STDOUT: %Implicit.import_ref.cb9: type = import_ref Implicit//default, inst109 [no loc], loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Implicit.import_ref.7f2ca0.1 = import_ref Implicit//default, loc8_33, unloaded // CHECK:STDOUT: %Implicit.import_ref.7f2ca0.2 = import_ref Implicit//default, loc8_33, unloaded // CHECK:STDOUT: %Destroy.impl_witness_table.2ab = impl_witness_table (%Implicit.import_ref.7f2ca0.2), @C.as.Destroy.impl [concrete] diff --git a/toolchain/check/testdata/tuple/import.carbon b/toolchain/check/testdata/tuple/import.carbon index b3bd105567c4..1ea66cf2c70f 100644 --- a/toolchain/check/testdata/tuple/import.carbon +++ b/toolchain/check/testdata/tuple/import.carbon @@ -121,7 +121,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Implicit.b_ref: ref %tuple.type.cfa = import_ref Implicit//default, b_ref, loaded [concrete = %b_ref.var] // CHECK:STDOUT: %Implicit.C: %C.type = import_ref Implicit//default, C, loaded [concrete = constants.%C.generic] // CHECK:STDOUT: %Implicit.F: %F.type = import_ref Implicit//default, F, loaded [concrete = constants.%F] -// CHECK:STDOUT: %Implicit.import_ref.773: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.9a6) = import_ref Implicit//default, inst151 [indirect], loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.458)] +// CHECK:STDOUT: %Implicit.import_ref.773: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.9a6) = import_ref Implicit//default, inst152 [indirect], loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.458)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.1ad = impl_witness_table (%Implicit.import_ref.773), @Core.IntLiteral.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: %a_ref.patt: %pattern_type.2e8 = binding_pattern a_ref [concrete] // CHECK:STDOUT: %a_ref.var_patt: %pattern_type.2e8 = var_pattern %a_ref.patt [concrete] diff --git a/toolchain/check/type_completion.cpp b/toolchain/check/type_completion.cpp index abb46d29f148..16d100b4006b 100644 --- a/toolchain/check/type_completion.cpp +++ b/toolchain/check/type_completion.cpp @@ -88,11 +88,11 @@ class TypeCompleter { template requires(InstT::Kind.template IsAnyOf< SemIR::AutoType, SemIR::BoolType, SemIR::BoundMethodType, - SemIR::ErrorInst, SemIR::FacetType, SemIR::FloatType, - SemIR::IntType, SemIR::IntLiteralType, SemIR::LegacyFloatType, - SemIR::NamespaceType, SemIR::PatternType, SemIR::PointerType, - SemIR::SpecificFunctionType, SemIR::TypeType, SemIR::VtableType, - SemIR::WitnessType>()) + SemIR::CharLiteralType, SemIR::ErrorInst, SemIR::FacetType, + SemIR::FloatType, SemIR::IntType, SemIR::IntLiteralType, + SemIR::LegacyFloatType, SemIR::NamespaceType, SemIR::PatternType, + SemIR::PointerType, SemIR::SpecificFunctionType, SemIR::TypeType, + SemIR::VtableType, SemIR::WitnessType>()) auto BuildInfoForInst(SemIR::TypeId type_id, InstT /*inst*/) const -> SemIR::CompleteTypeInfo { return {.value_repr = MakeCopyValueRepr(type_id)}; diff --git a/toolchain/diagnostics/diagnostic_kind.def b/toolchain/diagnostics/diagnostic_kind.def index 0c0c1bdbdf5d..780dc3cc7631 100644 --- a/toolchain/diagnostics/diagnostic_kind.def +++ b/toolchain/diagnostics/diagnostic_kind.def @@ -423,6 +423,7 @@ CARBON_DIAGNOSTIC_KIND(IncompleteTypeInMonomorphization) CARBON_DIAGNOSTIC_KIND(IncompleteTypeInMemberAccess) CARBON_DIAGNOSTIC_KIND(IncompleteTypeInValueConversion) CARBON_DIAGNOSTIC_KIND(InCopy) +CARBON_DIAGNOSTIC_KIND(CharTooLargeForType) CARBON_DIAGNOSTIC_KIND(IntTooLargeForType) CARBON_DIAGNOSTIC_KIND(IntWidthNotMultipleOf8) CARBON_DIAGNOSTIC_KIND(IntWidthNotPositive) diff --git a/toolchain/driver/testdata/stdin.carbon b/toolchain/driver/testdata/stdin.carbon index 53f9f2e450b8..d1a5ab316317 100644 --- a/toolchain/driver/testdata/stdin.carbon +++ b/toolchain/driver/testdata/stdin.carbon @@ -31,7 +31,7 @@ // CHECK:STDOUT: ir1: {decl_id: inst, is_export: false} // CHECK:STDOUT: import_ir_insts: {} // CHECK:STDOUT: name_scopes: -// CHECK:STDOUT: name_scope0: {inst: inst14, parent_scope: name_scope, has_error: false, extended_scopes: [], names: {}} +// CHECK:STDOUT: name_scope0: {inst: inst15, parent_scope: name_scope, has_error: false, extended_scopes: [], names: {}} // CHECK:STDOUT: entity_names: {} // CHECK:STDOUT: functions: {} // CHECK:STDOUT: classes: {} @@ -47,10 +47,10 @@ // CHECK:STDOUT: 'type(inst(NamespaceType))': // CHECK:STDOUT: value_repr: {kind: copy, type: type(inst(NamespaceType))} // CHECK:STDOUT: insts: -// CHECK:STDOUT: inst14: {kind: Namespace, arg0: name_scope0, arg1: inst, type: type(inst(NamespaceType))} +// CHECK:STDOUT: inst15: {kind: Namespace, arg0: name_scope0, arg1: inst, type: type(inst(NamespaceType))} // CHECK:STDOUT: constant_values: // CHECK:STDOUT: values: -// CHECK:STDOUT: inst14: concrete_constant(inst14) +// CHECK:STDOUT: inst15: concrete_constant(inst15) // CHECK:STDOUT: symbolic_constants: {} // CHECK:STDOUT: inst_blocks: // CHECK:STDOUT: inst_block_empty: {} @@ -58,7 +58,7 @@ // CHECK:STDOUT: imports: {} // CHECK:STDOUT: global_init: {} // CHECK:STDOUT: inst_block4: -// CHECK:STDOUT: 0: inst14 +// CHECK:STDOUT: 0: inst15 // CHECK:STDOUT: ... // CHECK:STDOUT: --- - // CHECK:STDOUT: diff --git a/toolchain/lex/lex.cpp b/toolchain/lex/lex.cpp index a2056c6a1f8c..427e54dac38a 100644 --- a/toolchain/lex/lex.cpp +++ b/toolchain/lex/lex.cpp @@ -1161,7 +1161,7 @@ auto Lexer::LexStringLiteral(llvm::StringRef source_text, ssize_t& position) DiagnoseUnterminatedString(emitter_, *literal, /*is_char=*/true); return lex_as_error(); } - if (auto value = literal->ComputeCharValue(emitter_)) { + if (auto value = literal->ComputeCharLiteralValue(emitter_)) { return LexTokenWithPayload(TokenKind::CharLiteral, value->value, byte_offset); } diff --git a/toolchain/lex/string_literal.cpp b/toolchain/lex/string_literal.cpp index 9db3f65fec1e..dd024388fddf 100644 --- a/toolchain/lex/string_literal.cpp +++ b/toolchain/lex/string_literal.cpp @@ -476,8 +476,9 @@ static auto ExpandEscapeSequencesAndRemoveIndent( } } -auto StringLiteral::ComputeCharValue(Diagnostics::Emitter& emitter) - const -> std::optional { +auto StringLiteral::ComputeCharLiteralValue( + Diagnostics::Emitter& emitter) const + -> std::optional { CARBON_DCHECK(kind_ == Kind::Char); CARBON_DCHECK(is_terminated_); diff --git a/toolchain/lex/string_literal.h b/toolchain/lex/string_literal.h index fe70abf40fab..701af03da5fa 100644 --- a/toolchain/lex/string_literal.h +++ b/toolchain/lex/string_literal.h @@ -41,7 +41,7 @@ class StringLiteral { // Expand any escape sequences and compute the resulting character. This // handles error recovery internally, but can return nullopt for an invalid // character. - auto ComputeCharValue(Diagnostics::Emitter& emitter) const + auto ComputeCharLiteralValue(Diagnostics::Emitter& emitter) const -> std::optional; // Expand any escape sequences in the given string literal and compute the diff --git a/toolchain/lex/string_literal_fuzzer.cpp b/toolchain/lex/string_literal_fuzzer.cpp index 9a3801210f40..9558afcfe451 100644 --- a/toolchain/lex/string_literal_fuzzer.cpp +++ b/toolchain/lex/string_literal_fuzzer.cpp @@ -47,7 +47,7 @@ extern "C" int LLVMFuzzerTestOneInput(const unsigned char* data, size_t size) { auto* null_emitter = &Diagnostics::NullEmitter(); if (literal->kind() == Lex::StringLiteral::Kind::Char) { - volatile auto value = literal->ComputeCharValue(*null_emitter); + volatile auto value = literal->ComputeCharLiteralValue(*null_emitter); (void)value; } else { llvm::BumpPtrAllocator allocator; diff --git a/toolchain/lower/constant.cpp b/toolchain/lower/constant.cpp index 6bf6948fafad..12cc4ad8a769 100644 --- a/toolchain/lower/constant.cpp +++ b/toolchain/lower/constant.cpp @@ -212,6 +212,13 @@ static auto EmitAsConstant(ConstantContext& context, SemIR::BoundMethod inst) return context.GetConstant(inst.function_decl_id); } +static auto EmitAsConstant(ConstantContext& context, + SemIR::CharLiteralValue /*inst*/) + -> llvm::Constant* { + return llvm::ConstantStruct::get( + llvm::StructType::get(context.llvm_context())); +} + static auto EmitAsConstant(ConstantContext& context, SemIR::CompleteTypeWitness inst) -> llvm::Constant* { return context.GetUnusedConstant(inst.type_id); @@ -291,6 +298,7 @@ static auto MaybeEmitAsConstant(ConstantContext& context, InstT inst) } } +// NOLINTNEXTLINE(readability-function-size): Macro-generated. auto LowerConstants(FileContext& file_context, FileContext::LoweredConstantStore& constants) -> void { ConstantContext context(file_context, &constants); diff --git a/toolchain/lower/file_context.cpp b/toolchain/lower/file_context.cpp index f1020fab6743..3d109fca8af5 100644 --- a/toolchain/lower/file_context.cpp +++ b/toolchain/lower/file_context.cpp @@ -872,9 +872,9 @@ static auto BuildTypeForInst(FileContext& context, InstT /*inst*/) } template - requires(InstT::Kind - .template IsAnyOf()) + requires(InstT::Kind.template IsAnyOf< + SemIR::BoundMethodType, SemIR::CharLiteralType, + SemIR::IntLiteralType, SemIR::NamespaceType, SemIR::WitnessType>()) static auto BuildTypeForInst(FileContext& context, InstT /*inst*/) -> llvm::Type* { // Return an empty struct as a placeholder. diff --git a/toolchain/lower/handle_call.cpp b/toolchain/lower/handle_call.cpp index 7926f13ce15a..e9b8803a0f81 100644 --- a/toolchain/lower/handle_call.cpp +++ b/toolchain/lower/handle_call.cpp @@ -302,6 +302,7 @@ static auto HandleBuiltinCall(FunctionContext& context, SemIR::InstId inst_id, } case SemIR::BuiltinFunctionKind::BoolMakeType: + case SemIR::BuiltinFunctionKind::CharLiteralMakeType: case SemIR::BuiltinFunctionKind::FloatMakeType: case SemIR::BuiltinFunctionKind::IntLiteralMakeType: case SemIR::BuiltinFunctionKind::IntMakeTypeSigned: @@ -453,6 +454,7 @@ static auto HandleBuiltinCall(FunctionContext& context, SemIR::InstId inst_id, return; } + case SemIR::BuiltinFunctionKind::CharConvertChecked: case SemIR::BuiltinFunctionKind::IntConvertChecked: { // TODO: Check this statically. CARBON_CHECK(builtin_kind.IsCompTimeOnly( diff --git a/toolchain/lower/testdata/builtins/char.carbon b/toolchain/lower/testdata/builtins/char.carbon new file mode 100644 index 000000000000..bd84765c147c --- /dev/null +++ b/toolchain/lower/testdata/builtins/char.carbon @@ -0,0 +1,51 @@ +// 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 +// +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/full.carbon +// +// AUTOUPDATE +// TIP: To test this file alone, run: +// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/lower/testdata/builtins/char.carbon +// TIP: To dump output, run: +// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/lower/testdata/builtins/char.carbon + +// --- basic.carbon + +library "[[@TEST_NAME]]"; + +fn Example() -> Core.Char { + var c: Core.Char = 'a'; + return c; +} + +// CHECK:STDOUT: ; ModuleID = 'basic.carbon' +// CHECK:STDOUT: source_filename = "basic.carbon" +// CHECK:STDOUT: +// CHECK:STDOUT: define i8 @_CExample.Main() !dbg !4 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %c.var = alloca i8, align 1, !dbg !7 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(i64 1, ptr %c.var), !dbg !7 +// CHECK:STDOUT: store i8 97, ptr %c.var, align 1, !dbg !7 +// CHECK:STDOUT: %.loc6 = load i8, ptr %c.var, align 1, !dbg !8 +// CHECK:STDOUT: ret i8 %.loc6, !dbg !9 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) +// CHECK:STDOUT: declare void @llvm.lifetime.start.p0(i64 immarg, ptr captures(none)) #0 +// CHECK:STDOUT: +// CHECK:STDOUT: attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } +// CHECK:STDOUT: +// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} +// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: +// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !3 = !DIFile(filename: "basic.carbon", directory: "") +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Example", linkageName: "_CExample.Main", scope: null, file: !3, line: 4, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !5 = !DISubroutineType(types: !6) +// CHECK:STDOUT: !6 = !{} +// CHECK:STDOUT: !7 = !DILocation(line: 5, column: 3, scope: !4) +// CHECK:STDOUT: !8 = !DILocation(line: 6, column: 10, scope: !4) +// CHECK:STDOUT: !9 = !DILocation(line: 6, column: 3, scope: !4) diff --git a/toolchain/parse/handle_expr.cpp b/toolchain/parse/handle_expr.cpp index 656e345021fc..0a48c513da8a 100644 --- a/toolchain/parse/handle_expr.cpp +++ b/toolchain/parse/handle_expr.cpp @@ -89,6 +89,11 @@ auto HandleExprInPostfix(Context& context) -> void { context.PushState(state); break; } + case Lex::TokenKind::CharLiteral: { + context.AddLeafNode(NodeKind::CharLiteral, context.Consume()); + context.PushState(state); + break; + } case Lex::TokenKind::IntLiteral: { context.AddLeafNode(NodeKind::IntLiteral, context.Consume()); context.PushState(state); diff --git a/toolchain/parse/node_kind.def b/toolchain/parse/node_kind.def index 1a14bcce44e8..a956287ec600 100644 --- a/toolchain/parse/node_kind.def +++ b/toolchain/parse/node_kind.def @@ -241,6 +241,7 @@ CARBON_PARSE_NODE_KIND(IntLiteral) CARBON_PARSE_NODE_KIND_TOKEN_LITERAL(BoolLiteralFalse, False) CARBON_PARSE_NODE_KIND_TOKEN_LITERAL(BoolLiteralTrue, True) +CARBON_PARSE_NODE_KIND_TOKEN_LITERAL(CharLiteral, CharLiteral) CARBON_PARSE_NODE_KIND_TOKEN_LITERAL(RealLiteral, RealLiteral) CARBON_PARSE_NODE_KIND_TOKEN_LITERAL(StringLiteral, StringLiteral) diff --git a/toolchain/parse/testdata/basics/numeric_literals.carbon b/toolchain/parse/testdata/basics/numeric_literals.carbon deleted file mode 100644 index 1441b5e391fa..000000000000 --- a/toolchain/parse/testdata/basics/numeric_literals.carbon +++ /dev/null @@ -1,94 +0,0 @@ -// 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 -// -// AUTOUPDATE -// TIP: To test this file alone, run: -// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/parse/testdata/basics/numeric_literals.carbon -// TIP: To dump output, run: -// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/basics/numeric_literals.carbon - -fn F() { - // 8 and 9 trigger special behavior in APInt when mishandling signed versus - // unsigned, so we pay extra attention to those. - var ints: array(i32, 5) = ( - 8, - 9, - 0x8, - 0b1000, - 39999999999999999993, - ); - var floats: array(f64, 7) = ( - 0.9, - 8.0, - 80.0, - 1.0e7, - 1.0e8, - 1.0e-8, - 39999999999999999993.0e39999999999999999993, - ); -} - -// CHECK:STDOUT: - filename: numeric_literals.carbon -// CHECK:STDOUT: parse_tree: [ -// CHECK:STDOUT: {kind: 'FileStart', text: ''}, -// CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'}, -// CHECK:STDOUT: {kind: 'IdentifierNameBeforeParams', text: 'F'}, -// CHECK:STDOUT: {kind: 'ExplicitParamListStart', text: '('}, -// CHECK:STDOUT: {kind: 'ExplicitParamList', text: ')', subtree_size: 2}, -// CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5}, -// CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'ints'}, -// CHECK:STDOUT: {kind: 'ArrayExprKeyword', text: 'array'}, -// CHECK:STDOUT: {kind: 'ArrayExprOpenParen', text: '('}, -// CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, -// CHECK:STDOUT: {kind: 'ArrayExprComma', text: ','}, -// CHECK:STDOUT: {kind: 'IntLiteral', text: '5'}, -// CHECK:STDOUT: {kind: 'ArrayExpr', text: ')', subtree_size: 6}, -// CHECK:STDOUT: {kind: 'VarBindingPattern', text: ':', subtree_size: 8}, -// CHECK:STDOUT: {kind: 'VariablePattern', text: 'var', subtree_size: 9}, -// CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, -// CHECK:STDOUT: {kind: 'TupleLiteralStart', text: '('}, -// CHECK:STDOUT: {kind: 'IntLiteral', text: '8'}, -// CHECK:STDOUT: {kind: 'TupleLiteralComma', text: ','}, -// CHECK:STDOUT: {kind: 'IntLiteral', text: '9'}, -// CHECK:STDOUT: {kind: 'TupleLiteralComma', text: ','}, -// CHECK:STDOUT: {kind: 'IntLiteral', text: '0x8'}, -// CHECK:STDOUT: {kind: 'TupleLiteralComma', text: ','}, -// CHECK:STDOUT: {kind: 'IntLiteral', text: '0b1000'}, -// CHECK:STDOUT: {kind: 'TupleLiteralComma', text: ','}, -// CHECK:STDOUT: {kind: 'IntLiteral', text: '39999999999999999993'}, -// CHECK:STDOUT: {kind: 'TupleLiteralComma', text: ','}, -// CHECK:STDOUT: {kind: 'TupleLiteral', text: ')', subtree_size: 12}, -// CHECK:STDOUT: {kind: 'VariableDecl', text: ';', subtree_size: 24}, -// CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, -// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'floats'}, -// CHECK:STDOUT: {kind: 'ArrayExprKeyword', text: 'array'}, -// CHECK:STDOUT: {kind: 'ArrayExprOpenParen', text: '('}, -// CHECK:STDOUT: {kind: 'FloatTypeLiteral', text: 'f64'}, -// CHECK:STDOUT: {kind: 'ArrayExprComma', text: ','}, -// CHECK:STDOUT: {kind: 'IntLiteral', text: '7'}, -// CHECK:STDOUT: {kind: 'ArrayExpr', text: ')', subtree_size: 6}, -// CHECK:STDOUT: {kind: 'VarBindingPattern', text: ':', subtree_size: 8}, -// CHECK:STDOUT: {kind: 'VariablePattern', text: 'var', subtree_size: 9}, -// CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, -// CHECK:STDOUT: {kind: 'TupleLiteralStart', text: '('}, -// CHECK:STDOUT: {kind: 'RealLiteral', text: '0.9'}, -// CHECK:STDOUT: {kind: 'TupleLiteralComma', text: ','}, -// CHECK:STDOUT: {kind: 'RealLiteral', text: '8.0'}, -// CHECK:STDOUT: {kind: 'TupleLiteralComma', text: ','}, -// CHECK:STDOUT: {kind: 'RealLiteral', text: '80.0'}, -// CHECK:STDOUT: {kind: 'TupleLiteralComma', text: ','}, -// CHECK:STDOUT: {kind: 'RealLiteral', text: '1.0e7'}, -// CHECK:STDOUT: {kind: 'TupleLiteralComma', text: ','}, -// CHECK:STDOUT: {kind: 'RealLiteral', text: '1.0e8'}, -// CHECK:STDOUT: {kind: 'TupleLiteralComma', text: ','}, -// CHECK:STDOUT: {kind: 'RealLiteral', text: '1.0e-8'}, -// CHECK:STDOUT: {kind: 'TupleLiteralComma', text: ','}, -// CHECK:STDOUT: {kind: 'RealLiteral', text: '39999999999999999993.0e39999999999999999993'}, -// CHECK:STDOUT: {kind: 'TupleLiteralComma', text: ','}, -// CHECK:STDOUT: {kind: 'TupleLiteral', text: ')', subtree_size: 16}, -// CHECK:STDOUT: {kind: 'VariableDecl', text: ';', subtree_size: 28}, -// CHECK:STDOUT: {kind: 'FunctionDefinition', text: '}', subtree_size: 58}, -// CHECK:STDOUT: {kind: 'FileEnd', text: ''}, -// CHECK:STDOUT: ] diff --git a/toolchain/parse/testdata/basics/builtin_types.carbon b/toolchain/parse/testdata/basics/type_literals.carbon similarity index 93% rename from toolchain/parse/testdata/basics/builtin_types.carbon rename to toolchain/parse/testdata/basics/type_literals.carbon index 52189aa5d793..d62b47366d32 100644 --- a/toolchain/parse/testdata/basics/builtin_types.carbon +++ b/toolchain/parse/testdata/basics/type_literals.carbon @@ -4,15 +4,15 @@ // // AUTOUPDATE // TIP: To test this file alone, run: -// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/parse/testdata/basics/builtin_types.carbon +// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/parse/testdata/basics/type_literals.carbon // TIP: To dump output, run: -// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/basics/builtin_types.carbon +// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/basics/type_literals.carbon var test_i32: i32 = 0; var test_f64: f64 = 0.1; var test_str: String = "Test"; -// CHECK:STDOUT: - filename: builtin_types.carbon +// CHECK:STDOUT: - filename: type_literals.carbon // CHECK:STDOUT: parse_tree: [ // CHECK:STDOUT: {kind: 'FileStart', text: ''}, // CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, diff --git a/toolchain/parse/testdata/basics/value_literals.carbon b/toolchain/parse/testdata/basics/value_literals.carbon new file mode 100644 index 000000000000..36b8246a9125 --- /dev/null +++ b/toolchain/parse/testdata/basics/value_literals.carbon @@ -0,0 +1,158 @@ +// 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 +// +// AUTOUPDATE +// TIP: To test this file alone, run: +// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/parse/testdata/basics/value_literals.carbon +// TIP: To dump output, run: +// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/basics/value_literals.carbon + +// --- int_literals.carbon + +// 8 and 9 trigger special behavior in APInt when mishandling signed versus +// unsigned, so we pay extra attention to those. +var ints: array(i32, 5) = ( + 8, + 9, + 0x8, + 0b1000, + 39999999999999999993, +); + +// --- real_literals.carbon + +var reals: array(f64, 7) = ( + 0.9, + 8.0, + 80.0, + 1.0e7, + 1.0e8, + 1.0e-8, + 39999999999999999993.0e39999999999999999993, +); + +// --- bool_literal.carbon + +var f: bool = false; +var t: bool = true; + +// --- char_literal.carbon + +var c: Core.Char = 'c'; + +// --- string_literal.carbon + +var test_str: String = "Test"; + +// CHECK:STDOUT: - filename: int_literals.carbon +// CHECK:STDOUT: parse_tree: [ +// CHECK:STDOUT: {kind: 'FileStart', text: ''}, +// CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'ints'}, +// CHECK:STDOUT: {kind: 'ArrayExprKeyword', text: 'array'}, +// CHECK:STDOUT: {kind: 'ArrayExprOpenParen', text: '('}, +// CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'}, +// CHECK:STDOUT: {kind: 'ArrayExprComma', text: ','}, +// CHECK:STDOUT: {kind: 'IntLiteral', text: '5'}, +// CHECK:STDOUT: {kind: 'ArrayExpr', text: ')', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'VarBindingPattern', text: ':', subtree_size: 8}, +// CHECK:STDOUT: {kind: 'VariablePattern', text: 'var', subtree_size: 9}, +// CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, +// CHECK:STDOUT: {kind: 'TupleLiteralStart', text: '('}, +// CHECK:STDOUT: {kind: 'IntLiteral', text: '8'}, +// CHECK:STDOUT: {kind: 'TupleLiteralComma', text: ','}, +// CHECK:STDOUT: {kind: 'IntLiteral', text: '9'}, +// CHECK:STDOUT: {kind: 'TupleLiteralComma', text: ','}, +// CHECK:STDOUT: {kind: 'IntLiteral', text: '0x8'}, +// CHECK:STDOUT: {kind: 'TupleLiteralComma', text: ','}, +// CHECK:STDOUT: {kind: 'IntLiteral', text: '0b1000'}, +// CHECK:STDOUT: {kind: 'TupleLiteralComma', text: ','}, +// CHECK:STDOUT: {kind: 'IntLiteral', text: '39999999999999999993'}, +// CHECK:STDOUT: {kind: 'TupleLiteralComma', text: ','}, +// CHECK:STDOUT: {kind: 'TupleLiteral', text: ')', subtree_size: 12}, +// CHECK:STDOUT: {kind: 'VariableDecl', text: ';', subtree_size: 24}, +// CHECK:STDOUT: {kind: 'FileEnd', text: ''}, +// CHECK:STDOUT: ] +// CHECK:STDOUT: - filename: real_literals.carbon +// CHECK:STDOUT: parse_tree: [ +// CHECK:STDOUT: {kind: 'FileStart', text: ''}, +// CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'reals'}, +// CHECK:STDOUT: {kind: 'ArrayExprKeyword', text: 'array'}, +// CHECK:STDOUT: {kind: 'ArrayExprOpenParen', text: '('}, +// CHECK:STDOUT: {kind: 'FloatTypeLiteral', text: 'f64'}, +// CHECK:STDOUT: {kind: 'ArrayExprComma', text: ','}, +// CHECK:STDOUT: {kind: 'IntLiteral', text: '7'}, +// CHECK:STDOUT: {kind: 'ArrayExpr', text: ')', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'VarBindingPattern', text: ':', subtree_size: 8}, +// CHECK:STDOUT: {kind: 'VariablePattern', text: 'var', subtree_size: 9}, +// CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, +// CHECK:STDOUT: {kind: 'TupleLiteralStart', text: '('}, +// CHECK:STDOUT: {kind: 'RealLiteral', text: '0.9'}, +// CHECK:STDOUT: {kind: 'TupleLiteralComma', text: ','}, +// CHECK:STDOUT: {kind: 'RealLiteral', text: '8.0'}, +// CHECK:STDOUT: {kind: 'TupleLiteralComma', text: ','}, +// CHECK:STDOUT: {kind: 'RealLiteral', text: '80.0'}, +// CHECK:STDOUT: {kind: 'TupleLiteralComma', text: ','}, +// CHECK:STDOUT: {kind: 'RealLiteral', text: '1.0e7'}, +// CHECK:STDOUT: {kind: 'TupleLiteralComma', text: ','}, +// CHECK:STDOUT: {kind: 'RealLiteral', text: '1.0e8'}, +// CHECK:STDOUT: {kind: 'TupleLiteralComma', text: ','}, +// CHECK:STDOUT: {kind: 'RealLiteral', text: '1.0e-8'}, +// CHECK:STDOUT: {kind: 'TupleLiteralComma', text: ','}, +// CHECK:STDOUT: {kind: 'RealLiteral', text: '39999999999999999993.0e39999999999999999993'}, +// CHECK:STDOUT: {kind: 'TupleLiteralComma', text: ','}, +// CHECK:STDOUT: {kind: 'TupleLiteral', text: ')', subtree_size: 16}, +// CHECK:STDOUT: {kind: 'VariableDecl', text: ';', subtree_size: 28}, +// CHECK:STDOUT: {kind: 'FileEnd', text: ''}, +// CHECK:STDOUT: ] +// CHECK:STDOUT: - filename: bool_literal.carbon +// CHECK:STDOUT: parse_tree: [ +// CHECK:STDOUT: {kind: 'FileStart', text: ''}, +// CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'f'}, +// CHECK:STDOUT: {kind: 'BoolTypeLiteral', text: 'bool'}, +// CHECK:STDOUT: {kind: 'VarBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'VariablePattern', text: 'var', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, +// CHECK:STDOUT: {kind: 'BoolLiteralFalse', text: 'false'}, +// CHECK:STDOUT: {kind: 'VariableDecl', text: ';', subtree_size: 8}, +// CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 't'}, +// CHECK:STDOUT: {kind: 'BoolTypeLiteral', text: 'bool'}, +// CHECK:STDOUT: {kind: 'VarBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'VariablePattern', text: 'var', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, +// CHECK:STDOUT: {kind: 'BoolLiteralTrue', text: 'true'}, +// CHECK:STDOUT: {kind: 'VariableDecl', text: ';', subtree_size: 8}, +// CHECK:STDOUT: {kind: 'FileEnd', text: ''}, +// CHECK:STDOUT: ] +// CHECK:STDOUT: - filename: char_literal.carbon +// CHECK:STDOUT: parse_tree: [ +// CHECK:STDOUT: {kind: 'FileStart', text: ''}, +// CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'c'}, +// CHECK:STDOUT: {kind: 'CoreNameExpr', text: 'Core'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'Char'}, +// CHECK:STDOUT: {kind: 'MemberAccessExpr', text: '.', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'VarBindingPattern', text: ':', subtree_size: 5}, +// CHECK:STDOUT: {kind: 'VariablePattern', text: 'var', subtree_size: 6}, +// CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, +// CHECK:STDOUT: {kind: 'CharLiteral', text: ''c''}, +// CHECK:STDOUT: {kind: 'VariableDecl', text: ';', subtree_size: 10}, +// CHECK:STDOUT: {kind: 'FileEnd', text: ''}, +// CHECK:STDOUT: ] +// CHECK:STDOUT: - filename: string_literal.carbon +// CHECK:STDOUT: parse_tree: [ +// CHECK:STDOUT: {kind: 'FileStart', text: ''}, +// CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'}, +// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'test_str'}, +// CHECK:STDOUT: {kind: 'StringTypeLiteral', text: 'String'}, +// CHECK:STDOUT: {kind: 'VarBindingPattern', text: ':', subtree_size: 3}, +// CHECK:STDOUT: {kind: 'VariablePattern', text: 'var', subtree_size: 4}, +// CHECK:STDOUT: {kind: 'VariableInitializer', text: '='}, +// CHECK:STDOUT: {kind: 'StringLiteral', text: '"Test"'}, +// CHECK:STDOUT: {kind: 'VariableDecl', text: ';', subtree_size: 8}, +// CHECK:STDOUT: {kind: 'FileEnd', text: ''}, +// CHECK:STDOUT: ] diff --git a/toolchain/sem_ir/builtin_function_kind.cpp b/toolchain/sem_ir/builtin_function_kind.cpp index 308fce6dcbd2..eb0a5ff7a2af 100644 --- a/toolchain/sem_ir/builtin_function_kind.cpp +++ b/toolchain/sem_ir/builtin_function_kind.cpp @@ -95,6 +95,26 @@ struct NoReturn { // Constraint that a type is `bool`. using Bool = BuiltinType; +// Constraint that a type is `Core.CharLiteral`. +using CharLiteral = BuiltinType; + +// Constraint that a type is `u8` or an adapted type, including `Core.Char`. +struct CharCompatible { + static auto Check(const File& sem_ir, ValidateState& /*state*/, + TypeId type_id) -> bool { + auto int_info = sem_ir.types().TryGetIntTypeInfo(type_id); + if (!int_info) { + // Not an integer. + return false; + } + if (!int_info->bit_width.has_value() || int_info->is_signed) { + // Must be unsigned. + return false; + } + return sem_ir.ints().Get(int_info->bit_width) == 8; + } +}; + // Constraint that requires the type to be a sized integer type. struct AnySizedInt { static auto Check(const File& sem_ir, ValidateState& /*state*/, @@ -248,6 +268,10 @@ constexpr BuiltinInfo PrintInt = { constexpr BuiltinInfo ReadChar = {"read.char", ValidateSignatureAnySizedInt>}; +// Returns the `Core.CharLiteral` type. +constexpr BuiltinInfo CharLiteralMakeType = {"char_literal.make_type", + ValidateSignatureType>}; + // Returns the `Core.IntLiteral` type. constexpr BuiltinInfo IntLiteralMakeType = {"int_literal.make_type", ValidateSignatureType>}; @@ -269,6 +293,11 @@ constexpr BuiltinInfo FloatMakeType = {"float.make_type", constexpr BuiltinInfo BoolMakeType = {"bool.make_type", ValidateSignatureType>}; +// Converts between char types, with a diagnostic if the value doesn't fit. +constexpr BuiltinInfo CharConvertChecked = { + "char.convert_checked", + ValidateSignatureCharCompatible>}; + // Converts between integer types, truncating if necessary. constexpr BuiltinInfo IntConvert = {"int.convert", ValidateSignatureAnyInt>}; @@ -578,8 +607,9 @@ auto BuiltinFunctionKind::IsCompTimeOnly(const File& sem_ir, llvm::ArrayRef arg_ids, TypeId return_type_id) const -> bool { switch (*this) { + case CharConvertChecked: case IntConvertChecked: - // Checked integer conversions are compile-time only. + // Checked conversions are compile-time only. return true; case IntConvert: diff --git a/toolchain/sem_ir/builtin_function_kind.def b/toolchain/sem_ir/builtin_function_kind.def index db703bae56d1..280dfc21a2d9 100644 --- a/toolchain/sem_ir/builtin_function_kind.def +++ b/toolchain/sem_ir/builtin_function_kind.def @@ -28,12 +28,16 @@ CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(PrintInt) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(ReadChar) // Type factories. +CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(CharLiteralMakeType) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(IntLiteralMakeType) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(IntMakeTypeSigned) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(IntMakeTypeUnsigned) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(FloatMakeType) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(BoolMakeType) +// Character conversion. +CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(CharConvertChecked) + // Integer conversion. CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(IntConvert) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(IntConvertChecked) diff --git a/toolchain/sem_ir/expr_info.cpp b/toolchain/sem_ir/expr_info.cpp index 2df01cdf43a2..43fcaedb6955 100644 --- a/toolchain/sem_ir/expr_info.cpp +++ b/toolchain/sem_ir/expr_info.cpp @@ -104,6 +104,8 @@ auto GetExprCategory(const File& file, InstId inst_id) -> ExprCategory { case BoolType::Kind: case BoundMethod::Kind: case BoundMethodType::Kind: + case CharLiteralType::Kind: + case CharLiteralValue::Kind: case ClassDecl::Kind: case ClassType::Kind: case CompleteTypeWitness::Kind: diff --git a/toolchain/sem_ir/formatter.h b/toolchain/sem_ir/formatter.h index 9ec746f5d77e..c9bd6df76b0a 100644 --- a/toolchain/sem_ir/formatter.h +++ b/toolchain/sem_ir/formatter.h @@ -277,6 +277,7 @@ class Formatter { } auto FormatArg(BoolValue v) -> void { out_ << v; } + auto FormatArg(CharId c) -> void { out_ << c; } auto FormatArg(EntityNameId id) -> void; auto FormatArg(FacetTypeId id) -> void; auto FormatArg(IntKind k) -> void { k.Print(out_); } diff --git a/toolchain/sem_ir/id_kind.h b/toolchain/sem_ir/id_kind.h index f914d387839d..05a9a1632c10 100644 --- a/toolchain/sem_ir/id_kind.h +++ b/toolchain/sem_ir/id_kind.h @@ -32,6 +32,7 @@ using IdKind = TypeEnum< AssociatedConstantId, BoolValue, CallParamIndex, + CharId, ClassId, CompileTimeBindIndex, ConstantId, diff --git a/toolchain/sem_ir/ids.cpp b/toolchain/sem_ir/ids.cpp index c25f4c90dc3c..bd3269743ead 100644 --- a/toolchain/sem_ir/ids.cpp +++ b/toolchain/sem_ir/ids.cpp @@ -4,6 +4,8 @@ #include "toolchain/sem_ir/ids.h" +#include "llvm/Support/ConvertUTF.h" +#include "llvm/Support/NativeFormatting.h" #include "toolchain/base/value_ids.h" #include "toolchain/sem_ir/singleton_insts.h" #include "toolchain/sem_ir/typed_insts.h" @@ -59,6 +61,13 @@ auto BoolValue::Print(llvm::raw_ostream& out) const -> void { } } +auto CharId::Print(llvm::raw_ostream& out) const -> void { + // TODO: If we switch to C++23, `std::format("`{:?}`")` might be a better + // choice. + out << "U+"; + llvm::write_hex(out, index, llvm::HexPrintStyle::Upper, 4); +} + auto IntKind::Print(llvm::raw_ostream& out) const -> void { if (*this == Unsigned) { out << "unsigned"; diff --git a/toolchain/sem_ir/ids.h b/toolchain/sem_ir/ids.h index a360489d03e6..93f4df4a3dd6 100644 --- a/toolchain/sem_ir/ids.h +++ b/toolchain/sem_ir/ids.h @@ -446,6 +446,15 @@ struct BoolValue : public IdBase { constexpr BoolValue BoolValue::False = BoolValue(0); constexpr BoolValue BoolValue::True = BoolValue(1); +// A character literal value as a unicode codepoint. +struct CharId : public IdBase { + // Not used by `Print`, but for `IdKind`. + static constexpr llvm::StringLiteral Label = ""; + + using IdBase::IdBase; + auto Print(llvm::raw_ostream& out) const -> void; +}; + // An integer kind value -- either "signed" or "unsigned". // // This might eventually capture any other properties of an integer type that diff --git a/toolchain/sem_ir/inst_fingerprinter.cpp b/toolchain/sem_ir/inst_fingerprinter.cpp index 9b2c76dca678..4138d430d5fb 100644 --- a/toolchain/sem_ir/inst_fingerprinter.cpp +++ b/toolchain/sem_ir/inst_fingerprinter.cpp @@ -317,8 +317,8 @@ struct Worklist { } template - requires(SameAsOneOf) + requires(SameAsOneOf) auto Add(T arg) -> void { // Index-like ID: just include the value directly. contents.push_back(arg.index); diff --git a/toolchain/sem_ir/inst_kind.def b/toolchain/sem_ir/inst_kind.def index 33d97d21301f..9686ae031a52 100644 --- a/toolchain/sem_ir/inst_kind.def +++ b/toolchain/sem_ir/inst_kind.def @@ -47,6 +47,8 @@ CARBON_SEM_IR_INST_KIND(Branch) CARBON_SEM_IR_INST_KIND(BranchIf) CARBON_SEM_IR_INST_KIND(BranchWithArg) CARBON_SEM_IR_INST_KIND(Call) +CARBON_SEM_IR_INST_KIND(CharLiteralType) +CARBON_SEM_IR_INST_KIND(CharLiteralValue) CARBON_SEM_IR_INST_KIND(ClassDecl) CARBON_SEM_IR_INST_KIND(ClassElementAccess) CARBON_SEM_IR_INST_KIND(ClassInit) diff --git a/toolchain/sem_ir/singleton_insts.h b/toolchain/sem_ir/singleton_insts.h index 6a91233336e9..4bdc00bdee07 100644 --- a/toolchain/sem_ir/singleton_insts.h +++ b/toolchain/sem_ir/singleton_insts.h @@ -17,6 +17,7 @@ static constexpr std::array SingletonInstKinds = { InstKind::AutoType, InstKind::BoolType, InstKind::BoundMethodType, + InstKind::CharLiteralType, InstKind::ErrorInst, InstKind::ImplWitnessTablePlaceholder, InstKind::InstType, diff --git a/toolchain/sem_ir/type.cpp b/toolchain/sem_ir/type.cpp index 2a57bdd569f5..7c6d48e2649a 100644 --- a/toolchain/sem_ir/type.cpp +++ b/toolchain/sem_ir/type.cpp @@ -81,34 +81,35 @@ auto TypeStore::GetUnqualifiedType(TypeId type_id) const -> TypeId { return type_id; } -static auto TryGetIntTypeInfo(const File& file, TypeId type_id) - -> std::optional { - auto object_repr_id = file.types().GetObjectRepr(type_id); +auto TypeStore::TryGetIntTypeInfo(TypeId int_type_id) const + -> std::optional { + auto object_repr_id = file_->types().GetObjectRepr(int_type_id); if (!object_repr_id.has_value()) { return std::nullopt; } - auto inst_id = file.types().GetInstId(object_repr_id); + auto inst_id = file_->types().GetInstId(object_repr_id); if (inst_id == IntLiteralType::TypeInstId) { // `Core.IntLiteral` has an unknown bit-width. return TypeStore::IntTypeInfo{.is_signed = true, .bit_width = IntId::None}; } - auto int_type = file.insts().TryGetAs(inst_id); + auto int_type = file_->insts().TryGetAs(inst_id); if (!int_type) { return std::nullopt; } - auto bit_width_inst = file.insts().TryGetAs(int_type->bit_width_id); + auto bit_width_inst = + file_->insts().TryGetAs(int_type->bit_width_id); return TypeStore::IntTypeInfo{ .is_signed = int_type->int_kind.is_signed(), .bit_width = bit_width_inst ? bit_width_inst->int_id : IntId::None}; } auto TypeStore::IsSignedInt(TypeId int_type_id) const -> bool { - auto int_info = TryGetIntTypeInfo(*file_, int_type_id); + auto int_info = TryGetIntTypeInfo(int_type_id); return int_info && int_info->is_signed; } auto TypeStore::GetIntTypeInfo(TypeId int_type_id) const -> IntTypeInfo { - auto int_info = TryGetIntTypeInfo(*file_, int_type_id); + auto int_info = TryGetIntTypeInfo(int_type_id); CARBON_CHECK(int_info, "Type {0} is not an integer type", int_type_id); return *int_info; } diff --git a/toolchain/sem_ir/type.h b/toolchain/sem_ir/type.h index f9ca56c49e15..3d30b74bb187 100644 --- a/toolchain/sem_ir/type.h +++ b/toolchain/sem_ir/type.h @@ -168,6 +168,11 @@ class TypeStore : public Yaml::Printable { // non-constant width and for IntLiteral. auto GetIntTypeInfo(TypeId int_type_id) const -> IntTypeInfo; + // Similar to `GetIntTypeInfo`, except allows non-`IntType` types to be + // handled. + auto TryGetIntTypeInfo(TypeId int_type_id) const + -> std::optional; + // Returns whether `type_id` represents a facet type. auto IsFacetType(TypeId type_id) const -> bool { return type_id == TypeType::TypeId || Is(type_id); diff --git a/toolchain/sem_ir/type_iterator.cpp b/toolchain/sem_ir/type_iterator.cpp index 8099e512e251..32c63c36e76e 100644 --- a/toolchain/sem_ir/type_iterator.cpp +++ b/toolchain/sem_ir/type_iterator.cpp @@ -79,6 +79,7 @@ auto TypeIterator::Next() -> Step { case SemIR::AssociatedEntityType::Kind: case SemIR::BoolType::Kind: + case SemIR::CharLiteralType::Kind: case SemIR::FacetType::Kind: case SemIR::FloatType::Kind: case SemIR::FunctionType::Kind: diff --git a/toolchain/sem_ir/typed_insts.h b/toolchain/sem_ir/typed_insts.h index d956512e6398..e123256be088 100644 --- a/toolchain/sem_ir/typed_insts.h +++ b/toolchain/sem_ir/typed_insts.h @@ -7,6 +7,7 @@ #include "toolchain/base/int.h" #include "toolchain/parse/node_ids.h" +#include "toolchain/parse/typed_nodes.h" #include "toolchain/sem_ir/ids.h" #include "toolchain/sem_ir/inst_kind.h" #include "toolchain/sem_ir/singleton_insts.h" @@ -428,6 +429,34 @@ struct Call { InstBlockId args_id; }; +// A unicode code point character literal. This type only provides compile-time +// operations, and is represented as an empty type at runtime. +struct CharLiteralType { + static constexpr auto Kind = + InstKind::CharLiteralType.Define( + {.ir_name = "Core.CharLiteral", + .is_type = InstIsType::Always, + .constant_kind = InstConstantKind::Always}); + // This is a singleton instruction. However, it may still evolve into a more + // standard type and be removed. + static constexpr auto TypeInstId = MakeSingletonTypeInstId(); + static constexpr auto TypeId = + TypeId::ForTypeConstant(ConstantId::ForConcreteConstant(TypeInstId)); + + SemIR::TypeId type_id; +}; + +// A unicode code point character value, whose type is `CharLiteralType`. +struct CharLiteralValue { + // TODO: Make Parse::NodeId more specific. + static constexpr auto Kind = InstKind::CharLiteralValue.Define( + {.ir_name = "char_value", .constant_kind = InstConstantKind::Always}); + + TypeId type_id; + + CharId value; +}; + // A class declaration. struct ClassDecl { static constexpr auto Kind =